Skip to content

Commit

Permalink
Fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Oct 17, 2023
1 parent ae63e8e commit 8a7e248
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions xcp_d/tests/test_utils_bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,10 @@ def test_write_dataset_description(datasets, tmp_path_factory, caplog):
with open(dset_description, "r") as fo:
desc = json.load(fo)

desc["DatasetLinks"] = {
"preprocessed": "/fake/path",
"xcp_d": "/fake/path2",
"custom_confounds": "/fake/path3",
}
with open(dset_description, "w") as fo:
json.dump(desc, fo, indent=4)

assert "'preprocessed' is already a dataset link" not in caplog.text
assert "'xcp_d' is already a dataset link" not in caplog.text
assert "'custom_confounds' is already a dataset link" not in caplog.text
xbids.write_dataset_description(fmri_dir, tmpdir, custom_confounds_folder="/fake/path4")
xbids.write_dataset_description(tmpdir, tmpdir, custom_confounds_folder="/fake/path4")
assert "'preprocessed' is already a dataset link" in caplog.text
assert "'xcp_d' is already a dataset link" in caplog.text
assert "'custom_confounds' is already a dataset link" in caplog.text
Expand Down

0 comments on commit 8a7e248

Please sign in to comment.