tests: resolve some uncaught warnings in the test suite
This MR fixes a few warnings being generated by the test suite:
- Use of various
gi._options
types intests/test_options.py
. -
tests/test_override_gdkpixbuf.py
letting a warning escape from its test. I've changed it to test for both warnings from a single call with patterns that don't overlap. -
pytest_runtest_call
intests/conftest.py
was raising exceptions, which apparently hooks aren't supposed to do. - Silence the
os.fork
warnings intests/test_mainloop.py
. I haven't usedassertWarns
here because the warning is only emitted in the parent process and not the child.
I also set stacklevel
on a few of the warnings so they report the call site rather than the deprecated function itself.
Edited by James Henstridge