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_sysconfig.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_sysconfig.py')
| -rw-r--r-- | Lib/test/test_sysconfig.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index c0f27a6..0917c3e 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py @@ -6,7 +6,7 @@ import shutil from copy import copy from test.support import (run_unittest, TESTFN, unlink, check_warnings, - captured_stdout, skip_unless_symlink) + captured_stdout, skip_unless_symlink, change_cwd) import sysconfig from sysconfig import (get_paths, get_platform, get_config_vars, @@ -361,12 +361,8 @@ class TestSysConfig(unittest.TestCase): # srcdir should be independent of the current working directory # See Issues #15322, #15364. srcdir = sysconfig.get_config_var('srcdir') - cwd = os.getcwd() - try: - os.chdir('..') + with change_cwd(os.pardir): srcdir2 = sysconfig.get_config_var('srcdir') - finally: - os.chdir(cwd) self.assertEqual(srcdir, srcdir2) @unittest.skipIf(sysconfig.get_config_var('EXT_SUFFIX') is None, |
