[New-bugs-announce] [issue15415] Add temp_dir() and change_cwd() to test.support

Chris Jerdonek report at bugs.python.org
Sat Jul 21 23:13:18 CEST 2012


New submission from Chris Jerdonek <chris.jerdonek at gmail.com>:

This issue is partly in service to issue 15376, which is to refactor test_runpy's walk_package support code into a common location.

Currently, the temp_cwd() context manager in test.support does two things: it creates a temp directory, and it changes the current working directory.

It would be useful and clearer if test.support exposed these two things as separate context managers.  This will both let us simplify the implementation of temp_cwd() and give us an opportunity to increase code reuse between test.support and test.script_helper.  (Currently, test.script_helper has its own version of temp_dir(), whose functionality overlaps with temp_cwd().)

I will upload a patch shortly with tests.

----------
components: Tests
keywords: easy
messages: 166071
nosy: cjerdonek
priority: normal
severity: normal
status: open
title: Add temp_dir() and change_cwd() to test.support
versions: Python 3.3

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


More information about the New-bugs-announce mailing list