Skip to content
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

Add B017 - detection for an evil form of assertRaises #163

Merged
merged 2 commits into from Mar 31, 2021
Merged

Add B017 - detection for an evil form of assertRaises #163

merged 2 commits into from Mar 31, 2021

Commits on Mar 30, 2021

  1. Add B017 - detection for a bad form of assertRaises

    ```with assertRaises(Exception):``` is basically a "catch 'em all" assert that casts far too broad of a net when it comes to detecting failures in code being tested. Assertions should be testing specific failure cases, not "did Python throw /any/ type of error?", and so the context manager form, or the assertRaisesRegex form are far better to use.
    cricalix committed Mar 30, 2021
    Copy the full SHA
    b197740 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2021

  1. Copy the full SHA
    e7a02e4 View commit details
    Browse the repository at this point in the history