Running a test in a fresh interpreter: `test.support.isolation.runInSubprocess()`
Discussions on Python.org
Running a test in a fresh interpreter: `test.support.isolation.runInSubprocess()`
Some tests cannot share an interpreter with the rest of the suite: they install a signal handler or an audit hook, change the locale, enable tracing. We have handled these by running a source string through script_helper.assert_python_ok(), which costs us the test: one opaque pass/fail, no individual assertions, -m cannot select a single case, and a failure comes back as a blob of stderr. test.support.isolation.runInSubprocess() runs a test method — or a whole TestCase — in a fresh interpreter ...
0 comments
No comments yet.