Skip to content

Commit

Permalink
[INFRA] randomize tests order (#566)
Browse files Browse the repository at this point in the history
* randomize tests

* fix doc generation and links

* skip dead links

* skip dead links

* skip dead links

* skip dead links

* use temp_dir
  • Loading branch information
Remi-Gau authored May 11, 2023
1 parent 287109a commit 3b2d45f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/mlc_config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"ignorePatterns": [
{
"pattern": "^https://www.fil.ion.ucl.ac.uk/spm"
},
{
"pattern": "^https://.*github.com/.*"
"pattern": "fil.ion.ucl.ac.uk|mybinder.org|bids-matlab"
}
]
}
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ sphinx_rtd_theme
sphinx-copybutton
myst-parser
rich
urllib3==1.26.15
2 changes: 2 additions & 0 deletions run_tests.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
if with_coverage
success = moxunit_runtests(testFolder, ...
'-verbose', ...
'-randomize_order', ...
'-recursive', ...
'-with_coverage', ...
'-cover', folderToCover, ...
Expand All @@ -29,6 +30,7 @@
else
success = moxunit_runtests(testFolder, ...
'-verbose', ...
'-randomize_order', ...
'-recursive');

end
Expand Down
14 changes: 4 additions & 10 deletions tests/test_download_ds.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,36 @@

function test_download_ds_moae()

rmdir(fullfile(bids.internal.root_dir(), 'tmp'), 's');

output_dir = bids.util.download_ds('source', 'spm', ...
'demo', 'moae', ...
'out_path', fullfile(bids.internal.root_dir(), 'tmp'), ...
'out_path', temp_dir(), ...
'force', false, ...
'verbose', true, ...
'delete_previous', false);

output_dir = bids.util.download_ds('source', 'spm', ...
'demo', 'moae', ...
'out_path', fullfile(bids.internal.root_dir(), 'tmp'), ...
'out_path', temp_dir(), ...
'force', true, ...
'verbose', true, ...
'delete_previous', false);

output_dir = bids.util.download_ds('source', 'spm', ...
'demo', 'moae', ...
'out_path', fullfile(bids.internal.root_dir(), 'tmp'), ...
'out_path', temp_dir(), ...
'force', true, ...
'verbose', true, ...
'delete_previous', true);

rmdir(output_dir, 's');

end

function test_download_ds_facerep()

output_dir = bids.util.download_ds('source', 'spm', ...
'demo', 'facerep', ...
'out_path', fullfile(bids.internal.root_dir(), 'tmp'), ...
'out_path', temp_dir(), ...
'force', true, ...
'verbose', true, ...
'delete_previous', true);

rmdir(output_dir, 's');

end
4 changes: 4 additions & 0 deletions tests/utils/temp_dir.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
function value = temp_dir()
value = tempname();
mkdir(value);
end

0 comments on commit 3b2d45f

Please sign in to comment.