[New-bugs-announce] [issue26295] Random failures when running test suite in parallel (-m test -j0) caused by test_regrtest
STINNER Victor
report at bugs.python.org
Fri Feb 5 04:15:07 EST 2016
New submission from STINNER Victor:
test_regrtest creates temporary test files called test_regrtest_pid_xxx.py in Lib/test/. The problem is that some tests like test___all__ and test_zipfile haves test relying on the list of Lib/test/test_*.py.
When tests are run in parallel, test_regrtest can creates temporary test_regrtest_pid_xxx.py files, test_zipfile sees them, test_regrtest removes them, and then test_zipfiles fails.
The best would be to write these temporary files into a temporary directory, but I failed to fix Lib/test/regrtest.py to load tests from a different directory. In theory, Python 3 supports packages with files splitted into multiple directories, in practice it doesn't seem to work :-p
Maybe test_regrtest should use a test submodule like Lib/test/temp_regrtest/ ?
test_regrtest started to create temporary test_xxx.py files since issue #25220. (Other changes to test_regrtest: issues #18174, #22806, #25260, #25306, #25369, #25373, #25694).
======================================================================
ERROR: test_all (test.test___all__.AllTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/haypo/prog/python/default/Lib/test/test___all__.py", line 102, in test_all
with open(path, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/haypo/prog/python/default/Lib/test/test_regrtest_25743_noop20.py'
----------------------------------------------------------------------
----------
components: Tests
messages: 259647
nosy: brett.cannon, haypo
priority: normal
severity: normal
status: open
title: Random failures when running test suite in parallel (-m test -j0) caused by test_regrtest
versions: Python 3.5, Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26295>
_______________________________________
More information about the New-bugs-announce
mailing list