You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#317 added support for warning about B017 when using pytest.raises(Exception), and it included an exception for passing a regex to match against similar to unittest.assertRaisesRegex. But you can pass that regex as a keyword argument too and that exception doesn't apply in that case.
importpytestdeftest_positional_arg():
withpytest.raises(Exception, 'some-regex'): # this is finepassdeftest_keyword_arg():
withpytest.raises(Exception, match='some-regex'): # this gets a B017 warningpass
manthey, nsoranzo, MaxWinterstein, Sillocan and scastlara