From c568a7beb682dddb8e93a31ea1c9f9a73d72e20f Mon Sep 17 00:00:00 2001 From: Patrick Sadil Date: Wed, 2 Oct 2024 11:27:51 -0400 Subject: [PATCH] handle merge conflicts --- fmriprep/utils/tests/test_derivative_cache.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/fmriprep/utils/tests/test_derivative_cache.py b/fmriprep/utils/tests/test_derivative_cache.py index 1a2c59ac..87382f73 100644 --- a/fmriprep/utils/tests/test_derivative_cache.py +++ b/fmriprep/utils/tests/test_derivative_cache.py @@ -5,6 +5,28 @@ from fmriprep.utils import bids +@pytest.mark.parametrize('desc', ['hmc', 'coreg']) +def test_baseline_found_as_str(tmp_path: Path, desc: str): + subject = '0' + task = 'rest' + + to_find = tmp_path.joinpath( + f'sub-{subject}', 'func', f'sub-{subject}_task-{task}_desc-{desc}_boldref.nii.gz' + ) + to_find.parent.mkdir(parents=True) + to_find.touch() + + entities = { + 'subject': subject, + 'task': task, + 'suffix': 'bold', + 'extension': '.nii.gz', + } + + derivs = bids.collect_derivatives(derivatives_dir=tmp_path, entities=entities) + assert dict(derivs) == {f'{desc}_boldref': str(to_find), 'transforms': {}} + + @pytest.mark.parametrize('xfm', ['boldref2fmap', 'boldref2anat', 'hmc']) def test_transforms_found_as_str(tmp_path: Path, xfm: str): subject = '0'