diff options
author | Larry Hastings <larry@hastings.org> | 2015-09-07 12:16:38 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2015-09-07 12:16:38 (GMT) |
commit | c8c47f55e636ed86791160944ccbb1ea651476bd (patch) | |
tree | db97b6edb082a98c6ad2abcbacb6151ee2df2049 /Lib/test/test_py_compile.py | |
parent | 71f9633818b3a0cbd36b0f6ed164d436b1997fe9 (diff) | |
parent | 8c85a2083fdc6188d32f1eb287151cdb7e79a54a (diff) | |
download | cpython-c8c47f55e636ed86791160944ccbb1ea651476bd.zip cpython-c8c47f55e636ed86791160944ccbb1ea651476bd.tar.gz cpython-c8c47f55e636ed86791160944ccbb1ea651476bd.tar.bz2 |
Merge heads.
Diffstat (limited to 'Lib/test/test_py_compile.py')
-rw-r--r-- | Lib/test/test_py_compile.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py index 03cca5d..4a6caa5 100644 --- a/Lib/test/test_py_compile.py +++ b/Lib/test/test_py_compile.py @@ -63,11 +63,9 @@ class PyCompileTests(unittest.TestCase): self.assertTrue(os.path.exists(self.cache_path)) def test_cwd(self): - cwd = os.getcwd() - os.chdir(self.directory) - py_compile.compile(os.path.basename(self.source_path), - os.path.basename(self.pyc_path)) - os.chdir(cwd) + with support.change_cwd(self.directory): + py_compile.compile(os.path.basename(self.source_path), + os.path.basename(self.pyc_path)) self.assertTrue(os.path.exists(self.pyc_path)) self.assertFalse(os.path.exists(self.cache_path)) |