diff --git a/bids/analysis/tests/test_transformations.py b/bids/analysis/tests/test_transformations.py index bb543f46a..9dfcf6890 100644 --- a/bids/analysis/tests/test_transformations.py +++ b/bids/analysis/tests/test_transformations.py @@ -18,17 +18,22 @@ NRUNS = 3 SCAN_LENGTH = 480 +cached_collections = {} + @pytest.fixture def collection(): + if 'ds005' in cached_collections: + return cached_collections['ds005'].clone() layout_path = join(get_test_data_path(), 'ds005') layout = BIDSLayout(layout_path) - collection = layout.get_collections('run', types=['events'], - scan_length=SCAN_LENGTH, - merge=True, - sampling_rate=10, - subject=SUBJECTS - ) + cached_collections['ds005'] = collection \ + = layout.get_collections('run', types=['events'], + scan_length=SCAN_LENGTH, + merge=True, + sampling_rate=10, + subject=SUBJECTS + ) return collection