[issue7712] Add a context manager to change cwd in test.test_support
Florent Xicluna
report at bugs.python.org
Sat Jan 16 12:42:34 CET 2010
Florent Xicluna <laxyf at yahoo.fr> added the comment:
A patch which provides a context manager and a decorator.
(with ideas from Ezio and Antoine)
Sample usages:
with temp_cwd() as cwd:
assert cwd == os.getcwd()
@writablecwd
def test_zipfile():
# do something useful
print os.path.abspath('.')
----------
nosy: +pitrou
Added file: http://bugs.python.org/file15907/temp_cwd_decorator.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7712>
_______________________________________
More information about the Python-bugs-list
mailing list