Derived from the flake8-bugbear linter.
What it does#
pytest.raises context managers that catch
Why is this bad?#
These forms catch every
Exception, which can lead to tests passing even
if, e.g., the code under consideration raises a
Either assert for a more specific exception (builtin or custom), or use
pytest.raises(..., match=<REGEX>) respectively.