Message246677
As a possible starting point for this, I'll point to https://hg.python.org/cpython/file/02b81a82a57d/Lib/test/__main__.py
Now, I'd expected running that in a process that was *already* running regrtest to fail miserably (it would stomp all over itself).
But what we could potentially do is launch a *clean* subprocess, where the only thing it did was:
from _testcapi import run_in_subinterp
regrtest_in_subinterpreter = (
"""
from test import regrtest
regrtest.main_in_temp_cwd()
"""
)
run_in_subinterp(regrtest_in_subinterpreter)
I'd currently expect that to fail as well, but I think the failures might be enlightening :)
I'm also not sure we need to integrate this directly into the main regrtest test runner - it could just be a separate submodule invoked like "python -m test.subinterpretertest".
If we later decided to integrate it, then it could go behind a "-usubinterpreter" resource that invoked "test.subinterpretertest" in a subprocess. |
|
Date |
User |
Action |
Args |
2015-07-13 01:52:52 | ncoghlan | set | recipients:
+ ncoghlan, grahamd, petr.viktorin, skrah, eric.snow |
2015-07-13 01:52:52 | ncoghlan | set | messageid: <1436752372.1.0.74380164119.issue24553@psf.upfronthosting.co.za> |
2015-07-13 01:52:52 | ncoghlan | link | issue24553 messages |
2015-07-13 01:52:50 | ncoghlan | create | |
|