Closed mgorny closed 3 months ago
Alternatively, I can change it to use warnings.catch_warnings(record=True)
or the recwarn
fixture, and continue to check for zero recorded warnings.
Alternatively, I can change it to use
warnings.catch_warnings(record=True)
or therecwarn
fixture, and continue to check for zero recorded warnings.
I think it's best to do this
I'm sorry, which one?
I'm sorry, which one?
Probably the first one, seems like that makes the most sense.
I've updated the pull request now.
Thanks!
Replace the deprecated
pytest.warns(None)
use with theerror
warning filter, as recommended in https://github.com/pytest-dev/pytest/issues/9404#issue-1076710891. With this change, the tests pass with pytest-8.1.1.