-
Notifications
You must be signed in to change notification settings - Fork 104
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
B017 - assertRaises - ignore when msg param is passed #479
Comments
Opened an issue in the flake8 repo. |
Reopening because maybe this is the right repo for the issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider suppressing B017 where
msg=
is passed to assertRaises, as it also validates the actual message in the raised exception matchesmsg
.Example:
assertRaises(Exception, msg="Some exception message")
It is equivalent to
assertRaisesRegex(Exception, "^<regex_pattern>$")
which does not trigger B017.The text was updated successfully, but these errors were encountered: