This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients brian.curtin, ezio.melotti, flox, pitrou
Date 2010-01-19.15:47:11
SpamBayes Score 1.6592183e-09
Marked as misclassified No
Message-id <1263916033.04.0.683890696135.issue7712@psf.upfronthosting.co.za>
In-reply-to
Content
The patch looks good, I'd just move _test_cwd inside the function and drop the [:-3] from TESTFN, but apart from that it's OK. I also agree that functools.wraps should be added.

To summarize the discussion we had on #python-dev:
1) the context manager should always create a writable cwd and to be able to run with -J it should contain the process id. Using TESTFN as first-level dir solves both the issues;
2) a suffix is added to TESTFN to let the tests use TESTFN as a valid filename;
3) the second-level dir is 'tempcwd' by default or can be passed to the function in case a test needs a specific name for the cwd;

The result will be something like '@test_xxxx_tmp_cwd/dirname'.
History
Date User Action Args
2010-01-19 15:47:13ezio.melottisetrecipients: + ezio.melotti, pitrou, brian.curtin, flox
2010-01-19 15:47:13ezio.melottisetmessageid: <1263916033.04.0.683890696135.issue7712@psf.upfronthosting.co.za>
2010-01-19 15:47:11ezio.melottilinkissue7712 messages
2010-01-19 15:47:11ezio.melotticreate