Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] update test after schema update #643

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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