[issue18906] Create a way to always run tests in subprocesses within regrtest

Serhiy Storchaka report at bugs.python.org
Tue Sep 3 11:32:01 CEST 2013


Serhiy Storchaka added the comment:

> The most natural approach is to have a special attribute set in the module's global dict (for example: __REGRTEST_SUBPROCESS__ = True); however, there's a slight problem with this approach - regrtest has to import the module to see this attribute, and the module may do some work in its top-level code (commonly, imports) that already needs to be done within a subprocess.

The main regrtest process can run auxilary child process which imports all test modules and says main process which of them have __REGRTEST_SUBPROCESS__=True.

It will be even better if the main process runs child process for testing all tests so when any test crashes it is possible to report this and respawn child process to continue testing other tests.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18906>
_______________________________________


More information about the Python-bugs-list mailing list