Derived from the flake8-pytest-style linter.
What it does#
pytest.raises context managers with multiple statements.
Why is this bad?#
pytest.raises is used as a context manager and contains multiple
statements, it can lead to the test passing when it actually should fail.
To avoid this, a
pytest.raises context manager should only contain
a single simple statement that raises the expected exception.