Skip to content

Commit 6f41b21

Browse files
committed
Fix test failures with openminds 0.5.0 by specifying version="v3" in load() calls
openminds 0.5.0 changed Collection.load()'s DEFAULT_VERSION from "v4" to "v5", causing tests to fail because the v5 registry does not recognise v3 type URIs (https://openminds.ebrains.eu/core/...). Explicitly passing version="v3" aligns the load calls with the v3 objects produced by the converter.
1 parent c8b71e8 commit 6f41b21

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

test/test_bids_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_example_datasets(dataset_label, dataset_subject_number, dataset_subject
1919
test_dir = os.path.join("bids-examples", dataset_label)
2020
bids2openminds.converter.convert(test_dir, save_output=True)
2121
c = Collection()
22-
c.load(os.path.join(test_dir, "openminds.jsonld"))
22+
c.load(os.path.join(test_dir, "openminds.jsonld"), version="v3")
2323

2424
subject_number = 0
2525
subject_state_number = 0

test/test_example_datasets_click.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_example_datasets_click():
1313
result = runner.invoke(convert_click, [test_dir])
1414
assert result.exit_code == 0
1515
c = Collection()
16-
c.load(os.path.join(test_dir, "openminds.jsonld"))
16+
c.load(os.path.join(test_dir, "openminds.jsonld"), version="v3")
1717

1818

1919
def test_example_datasets_click_seperate_files():
@@ -36,4 +36,4 @@ def test_example_datasets_click_output_location():
3636
convert_click, ["-o", openminds_file, test_dir])
3737
assert result.exit_code == 0
3838
c = Collection()
39-
c.load(openminds_file)
39+
c.load(openminds_file, version="v3")

test/test_thorough_bids_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ def load_collections():
3131
file.write(actual_data)
3232

3333
reference_collection = Collection()
34-
reference_collection.load(tempdir+test_standard_name)
34+
reference_collection.load(tempdir+test_standard_name, version="v3")
3535

3636
bids2openminds.converter.convert(test_dataset, save_output=True)
3737
generated_collection = Collection()
3838
generated_collection.load(os.path.join(
39-
test_dataset, "openminds.jsonld"))
39+
test_dataset, "openminds.jsonld"), version="v3")
4040

4141
collections[dataset_label] = (
4242
reference_collection, generated_collection)

0 commit comments

Comments
 (0)