Fail selftest if anything is written to stderr
authorJeremy Stanley <fungi@yuggoth.org>
Sun, 15 Aug 2021 15:16:07 +0000 (15:16 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Sun, 15 Aug 2021 15:58:26 +0000 (15:58 +0000)
commit097020495fe84c98f4b80489e88c1b1dc6faa49f
tree4b884d7315277edafcbdadea30540e6a285659ad
parent8e082a95481d8f6f30a29f4a95fdd46d24ed992f
Fail selftest if anything is written to stderr

The new ResourceWarning exceptions in Python 3.8 are ignored since
they're raised during garbage collection, which makes them easy to
miss even with PYTHONWARNINGS=error in our testing. Luckily, their
tracebacks are written to stderr, and we normally expect nothing
will be written to stderr on successful runs of the selftest script.
As a simple solution to avoid similar situations in the future,
cause the selftest run to fail if anything at all gets written to
the service's stderr.
mudpy/tests/selftest.py