Skip to content

Commit 6b7b416

Browse files
committed
Revert changes to failing test.
1 parent 6fbb1cb commit 6b7b416

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

sdcflows/cli/tests/test_find_estimators.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,21 +133,17 @@
133133
)
134134
def test_cli_finder_wrapper(tmp_path, capsys, test_id, config, estimator_id):
135135
"""Test the CLI with --dry-run."""
136-
from nibabel.filebasedimages import ImageFileError
137-
138136
import sdcflows.config as sc
139137

140138
# Reload is necessary to clean-up the layout config between parameterized runs
141139
reload(sc)
142140

143141
path = (tmp_path / test_id).absolute()
144142
generate_bids_skeleton(path, config)
145-
# This was set to raise a SystemExit, but was only raising an ImageFileError
146-
with pytest.raises(ImageFileError): # as wrapped_exit:
143+
with pytest.raises(SystemExit) as wrapped_exit:
147144
cli_finder_wrapper([str(path), str(tmp_path / "out"), "participant", "--dry-run"])
148145

149-
# ImageFileError has no code attribute, so we can't check the exit code
150-
# assert wrapped_exit.value.code == 0
146+
assert wrapped_exit.value.code == 0
151147
output = OUTPUT.format(path=path, estimator_id=estimator_id)
152148
out, _ = capsys.readouterr()
153149
assert out == output

0 commit comments

Comments
 (0)