Skip to content

Commit 786dcbe

Browse files
committed
Update tests.
1 parent 6af72b8 commit 786dcbe

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

xcp_d/tests/test_interfaces_bids.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def test_copy_atlas(tmp_path_factory):
2424
'dataset': 'xcpdatlases',
2525
}
2626
name_source = 'sub-01_task-A_run-01_space-MNI152NLin2009cAsym_res-2_desc-z_bold.nii.gz'
27+
# The copied file should use the space entity from the name_source, not the atlas
2728
copyatlas = bids.CopyAtlas(
2829
name_source=name_source,
2930
in_file=atlas_info['image'],
@@ -36,7 +37,7 @@ def test_copy_atlas(tmp_path_factory):
3637
assert os.path.isfile(result.outputs.out_file.replace('.nii.gz', '.json'))
3738
assert (
3839
os.path.basename(result.outputs.out_file)
39-
== 'tpl-MNI152NLin6Asym_atlas-Y_res-02_dseg.nii.gz'
40+
== 'tpl-MNI152NLin2009cAsym_atlas-Y_res-02_dseg.nii.gz'
4041
)
4142

4243
# Check that the NIfTI file raises an error if the resolution varies

xcp_d/tests/test_utils_atlas.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import pytest
66

7-
from xcp_d.data import load as load_data
87
from xcp_d.utils import atlas
98

109

@@ -21,7 +20,7 @@ def test_collect_atlases(datasets, caplog, tmp_path_factory):
2120
schaefer_dset = datasets['schaefer100']
2221

2322
atlas_datasets = {
24-
'xcpdatlases': str(load_data('atlases')),
23+
'xcpdatlases': '/XCPDAtlases',
2524
}
2625
atlas_cache = atlas.collect_atlases(
2726
datasets=atlas_datasets,
@@ -56,7 +55,7 @@ def test_collect_atlases(datasets, caplog, tmp_path_factory):
5655
assert 'Schaefer100' not in atlas_cache
5756

5857
# Add a duplicate atlas
59-
atlas_datasets['duplicate'] = str(load_data('atlases'))
58+
atlas_datasets['duplicate'] = '/XCPDAtlases'
6059
with pytest.raises(ValueError, match="Multiple datasets contain the same atlas 'Gordon'"):
6160
atlas.collect_atlases(
6261
datasets=atlas_datasets,

0 commit comments

Comments
 (0)