Message98061
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'. |
|
Date |
User |
Action |
Args |
2010-01-19 15:47:13 | ezio.melotti | set | recipients:
+ ezio.melotti, pitrou, brian.curtin, flox |
2010-01-19 15:47:13 | ezio.melotti | set | messageid: <1263916033.04.0.683890696135.issue7712@psf.upfronthosting.co.za> |
2010-01-19 15:47:11 | ezio.melotti | link | issue7712 messages |
2010-01-19 15:47:11 | ezio.melotti | create | |
|