Skip to content

Commit

Permalink
[FIX] update test after schema update (#643)
Browse files Browse the repository at this point in the history
* fix test after schema update

* set os version for doc
  • Loading branch information
Remi-Gau authored Nov 6, 2023
1 parent 8cc9f8e commit 4dc20a3
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: '3.12'

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
Expand All @@ -21,6 +26,5 @@ formats:

# Optionally set the version of Python and requirements required to build your docs
python:
version: "3.8"
install:
- requirements: requirements.txt
6 changes: 4 additions & 2 deletions tests/test_bids_file.m
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ function test_reorder()
'dir'; ...
'run'; ...
'echo'; ...
'part'});
'part'; ...
'chunk'});
assertEqual(file.json_filename, 'wuasub-01_ses-test_task-faceRecognition_run-02_bold.json');

end
Expand Down Expand Up @@ -204,7 +205,8 @@ function test_bids_file_parsing_filename_schema_based()
'dir'
'run'
'echo'
'part'});
'part'
'chunk'});

assertEqual(file.prefix, '');
assertEqual(file.suffix, 'bold');
Expand Down
24 changes: 22 additions & 2 deletions tests/test_bids_schema.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,17 @@ function test_return_entities_for_suffix_modality()
schema = bids.Schema();
[entities, required] = schema.return_entities_for_suffix_modality('bold', 'func');

expected_entities = {'sub', 'ses', 'task', 'acq', 'ce', 'rec', 'dir', 'run', 'echo', 'part'};
expected_entities = {'sub', ...
'ses', ...
'task', ...
'acq', ...
'ce', ...
'rec', ...
'dir', ...
'run', ...
'echo', ...
'part', ...
'chunk'};
assertEqual(entities, expected_entities);

expected_required = {'sub', 'task'};
Expand Down Expand Up @@ -157,7 +167,17 @@ function test_schemaless()
suffix_group = schema.content.rules.datatypes.func.func;
entities = schema.return_entities_for_suffix_group(suffix_group);

expected_output = {'sub', 'ses', 'task', 'acq', 'ce', 'rec', 'dir', 'run', 'echo', 'part'};
expected_output = {'sub', ...
'ses', ...
'task', ...
'acq', ...
'ce', ...
'rec', ...
'dir', ...
'run', ...
'echo', ...
'part', ...
'chunk'};

assertEqual(entities, expected_output);

Expand Down
9 changes: 6 additions & 3 deletions tests/tests_private/test_append_to_layout.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ function test_append_to_layout_basic()
'ce', '', ...
'rec', '', ...
'echo', '', ...
'part', ''));
'part', '', ...
'chunk', ''));

expected.anat.metafile = {};

Expand Down Expand Up @@ -129,7 +130,8 @@ function test_append_to_structure_basic_test()
'ce', '', ...
'rec', '', ...
'echo', '', ...
'part', ''));
'part', '', ...
'chunk', ''));
expected.anat(1, 1).metafile = {};

expected.anat(1, 1).dependencies.explicit = {};
Expand All @@ -147,7 +149,8 @@ function test_append_to_structure_basic_test()
'run', '1', ...
'acq', '', ...
'ce', '', ...
'rec', '')); %#ok<*STRNU>
'rec', '', ...
'chunk', '')); %#ok<*STRNU>

tmp.metafile = {};

Expand Down

0 comments on commit 4dc20a3

Please sign in to comment.