pytest
pytest copied to clipboard
Reducing user confusion from `pytest.warns(None)`
with pytest.warns(None): has the same effect as with pytest.warns(Warning):, but is often confused with the meaning "does not emit any warning". I think we should therefore:
- change the docs to show
with pytest.warns()(no arguments) as the catch-anything default - change the default argument from
NonetoWarning - emit a deprecation warning if passed
None, and treat it asWarning(for now)
I'm saving this one for the Mentored Sprints - experienced contributors please wait a week or so :smiley:
I would like to work on this :)
Closed by #8677 🎉