Skip to content

Commit 30cba2c

Browse files
DimitriPapadopouloseffigies
authored andcommitted
STY: Apply ruff/flake8-pytest-style rule PT015
PT015 Assertion always fails, replace with `pytest.fail()`
1 parent bb1c08b commit 30cba2c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

nibabel/cmdline/tests/test_roi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def test_entrypoint(capsys):
143143
except SystemExit:
144144
pass
145145
else:
146-
assert False, 'argparse exits on --help. If changing to another parser, update test.'
146+
pytest.fail('argparse exits on --help. If changing to another parser, update test.')
147147
captured = capsys.readouterr()
148148
assert captured.out.startswith('usage: nib-roi')
149149

nibabel/tests/test_removalschedule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def test_module_removal():
125125
for module in _filter(MODULE_SCHEDULE):
126126
with pytest.raises(ImportError):
127127
__import__(module)
128-
assert False, f'Time to remove {module}'
128+
raise AssertionError(f'Time to remove {module}')
129129

130130

131131
def test_object_removal():

0 commit comments

Comments
 (0)