-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STY: Enforce ruff/flake8-pytest-style rules (PT) #1356
Conversation
ca871a6
to
f81ec73
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1356 +/- ##
=======================================
Coverage 95.36% 95.37%
=======================================
Files 207 207
Lines 29680 29674 -6
Branches 4992 4993 +1
=======================================
- Hits 28305 28301 -4
+ Misses 935 933 -2
Partials 440 440 ☔ View full report in Codecov by Sentry. |
64d47ec
to
75fc219
Compare
nibabel/cmdline/tests/test_roi.py
Outdated
except SystemExit: | ||
pass | ||
else: | ||
assert False, 'argparse exits on --help. If changing to another parser, update test.' | ||
pytest.fail('argparse exits on --help. If changing to another parser, update test.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the whole try/except/else
block should be:
with pytest.raises(SystemExit):
main()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I (think I) applied your suggestion.
75fc219
to
4af11a1
Compare
PT006 Wrong type passed to first argument of `@pytest.mark.parametrize`; expected `tuple`
PT014 Duplicate of test case
PT015 Assertion always fails, replace with `pytest.fail()`
PT017 Found assertion on exception `err` in `except` block, use `pytest.raises()` instead
PT022 No teardown in fixture `db`, use `return` instead of `yield`
PT027 Use `pytest.raises` instead of unittest-style `assertRaises`
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Failures seem related to scipy/scipy#21623. |
No description provided.