Rule request
pytest-dev/pytest#13241 wants to deprecate the use of the callable form of raises, warns and deprecated_call - i.e.
excinfo = pytest.raises(ValueError, int, "hello")
# should be
with pytest.raises(ValueError) as excinfo:
int("hello")
Rationale
The context-manager form is more readable, easier to extend, and supports additional kwargs.
Rule request
pytest-dev/pytest#13241 wants to deprecate the use of the callable form of
raises,warnsanddeprecated_call- i.e.Rationale
The context-manager form is more readable, easier to extend, and supports additional kwargs.