[issue809163] Can't add files with spaces

R. David Murray report at bugs.python.org
Sat Nov 20 04:12:08 CET 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

Thanks for diagnosis and the test patch, and welcome to the bug weekend.

Some comments:

test.support has a symbol, TESTFN, which is guaranteed to be unique for the test run and located in an appropriate writeable location.  Many tests use it to create a directory via os.mkdir and then create working files in it.  The test should also clean up the directory afterward, which can be done easily using test.support.rmtree.  Using these two test support items should simplify your test.  The other advantage of using TESTFN rather than the tempfile module is that TESTFN locates the file/directory in a place that the buildbot runner cleans up after each test run, so no cruft is left on the buildbot system even if the test runs ends abnormally in the middle of the test.

----------
nosy: +r.david.murray
stage: unit test needed -> needs patch

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


More information about the Python-bugs-list mailing list