test: add warning filters for pytest capture issues

Add RuntimeWarning and PytestUnraisableExceptionWarning to filterwarnings
in pytest.ini to suppress pytest capture fixture errors during teardown.

These warnings occur when io_utils tests close sys.stdout and pytest's
capture fixture tries to read from the closed file. The actual tests pass,
but pytest's teardown produces these warnings/errors.

Note: The underlying issue is that test_io_utils.py patches sys.stdout
and the pytest capture fixture accumulates state. These warnings don't
affect test validity, only pytest's cleanup phase.
This commit is contained in:
StillKnotKnown
2026-02-09 12:31:11 +02:00
parent 2f869a67c9
commit 4e79ecdb5d
+2
View File
@@ -12,3 +12,5 @@ markers =
asyncio: marks tests as async tests
filterwarnings =
ignore::DeprecationWarning
ignore::RuntimeWarning
ignore::pytest.PytestUnraisableExceptionWarning