Skip to content

Commit e76750a

Browse files
committed
BF(TST): make test use actual values from heuristic to check if as expected
1 parent d41f8d0 commit e76750a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

heudiconv/tests/test_convert.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,14 @@ def mock_populate_intended_for(session, matching_parameters='Shims', criterion='
229229
output = capfd.readouterr()
230230
# if the heuristic module has a 'POPULATE_INTENDED_FOR_OPTS' field, we expect
231231
# to get the output of the mock_populate_intended_for, otherwise, no output:
232-
if getattr(heuristic, 'POPULATE_INTENDED_FOR_OPTS', None):
232+
pif_cfg = getattr(heuristic, 'POPULATE_INTENDED_FOR_OPTS', None)
233+
if pif_cfg:
233234
assert all([
234235
"\n".join([
235236
"session: " + outfolder.format(sID=s, ses=sesID),
236237
# "ImagingVolume" is defined in heuristic file; "Shims" is the default
237-
"matching_parameters: " + "ImagingVolume",
238-
"criterion: Closest"
238+
f"matching_parameters: {pif_cfg['matching_parameters']}",
239+
f"criterion: {pif_cfg['criterion']}"
239240
]) in output.out
240241
for s in subjects
241242
])

0 commit comments

Comments
 (0)