[issue7712] Add a context manager to change cwd in test.test_support

Florent Xicluna report at bugs.python.org
Tue Jan 19 23:48:32 CET 2010


Florent Xicluna <laxyf at yahoo.fr> added the comment:

Different approach, after some other talks with Ezio and David.

Now the directory is changed before running any test.
The developer can assume that the current directory if always writable.
It makes the tests easier to write, and repeatable.

Additionally, TESTFN always contains a single filename (without path).
Before this change, it could be "/tmp/@test" or "@test", which is error-prone.

The decorator becomes useless.

----------
Added file: http://bugs.python.org/file15956/issue7712_context_manager.diff

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


More information about the Python-bugs-list mailing list