[New-bugs-announce] [issue15305] Test harness unnecessarily disambiguating twice
Chris Jerdonek
report at bugs.python.org
Mon Jul 9 13:45:51 CEST 2012
New submission from Chris Jerdonek <chris.jerdonek at gmail.com>:
It seems like our test harness is disambiguating more than it needs to for parallel testing.
In Lib/test/regrtest.py, we do this--
# Define a writable temp dir that will be used as cwd while running
# the tests. The name of the dir includes the pid to allow parallel
# testing (see the -j option).
TESTCWD = 'test_python_{}'.format(os.getpid())
...
with support.temp_cwd(TESTCWD, quiet=True):
main()
And then in Lib/test/support.py, we are doing this--
# Disambiguate TESTFN for parallel testing, while letting it remain a valid
# module name.
TESTFN = "{}_{}_tmp".format(TESTFN, os.getpid())
with uses like--
with open(TESTFN, "wb") as f:
# Do stuff with f.
It seems like only one of these measures should be necessary (a single working directory for all parallel tests using a disambiguated TESTFN, or one working directory for each process with a non-disambiguated TESTFN).
----------
components: Tests
keywords: easy
messages: 165077
nosy: cjerdonek
priority: normal
severity: normal
status: open
title: Test harness unnecessarily disambiguating twice
versions: Python 3.3
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15305>
_______________________________________
More information about the New-bugs-announce
mailing list