diff --git a/bids/layout/tests/test_layout.py b/bids/layout/tests/test_layout.py index ebc17fca1..572c643c1 100644 --- a/bids/layout/tests/test_layout.py +++ b/bids/layout/tests/test_layout.py @@ -13,7 +13,7 @@ from bids.layout.models import Config from bids.layout.index import BIDSLayoutIndexer from bids.tests import get_test_data_path -from bids.utils import natural_sort +from bids.utils import natural_sort, hashablefy from bids.exceptions import ( BIDSValidationError, @@ -240,7 +240,11 @@ def test_get_fieldmap2(layout_7t_trt): def test_bids_json(layout_7t_trt): res = layout_7t_trt.get(return_type='id', target='run') - assert set(res) == {1, 2} + + # Please note that this particular test-case below is not BIDS-valid + # because the run metadata is overshadowed by a column definition of a TSV file. + # Hence, the hashablefy trick to help the test pass. + assert set(res) == {hashablefy({'Description': 'metadata to cause #681'}), 1, 2} res = layout_7t_trt.get(return_type='id', target='session') assert set(res) == {'1', '2'}