I want a rule that will check for pytest.warns
contexts with multiple statements
#317
Labels
enhancement
New feature or request
Rule request
This would be analogous to
PT012
which checks forpytest.raises
contexts with multiple statements. If accepted, I volunteer to implement the check.Description (adapted from the
PT012
documentation)Bad code:
Good code:
An empty
with
-statement (containing only apass
inside) is allowed to allow testing of exceptions raised by context manager enter/exit methods.Rationale
pytest.warns
blockThe text was updated successfully, but these errors were encountered: