diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-11-07 07:29:36 -0800 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-08-19 19:37:01 +0900 |
commit | 7ea23ee224dc8bc9a9d41eac66068285c9e71d49 (patch) | |
tree | 9fea28b369963587161505fa1d4a6502ed71851d | |
parent | bab2fdf4ca4d8f158e9e813e6f86c883424c094c (diff) | |
download | python-7ea23ee224dc8bc9a9d41eac66068285c9e71d49.tar.gz python-7ea23ee224dc8bc9a9d41eac66068285c9e71d49.tar.bz2 python-7ea23ee224dc8bc9a9d41eac66068285c9e71d49.zip |
python-2.7.1-distutils_test_path
===================================================================
-rw-r--r-- | Lib/distutils/tests/test_build_ext.py | 14 | ||||
-rwxr-xr-x | Lib/test/regrtest.py | 15 |
2 files changed, 6 insertions, 23 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index d380cb6..08f5923 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -277,20 +277,14 @@ class BuildExtTestCase(support.TempdirManager, # issue #5977 : distutils build_ext.get_outputs # returns wrong result with --inplace - other_tmp_dir = os.path.realpath(self.mkdtemp()) - old_wd = os.getcwd() - os.chdir(other_tmp_dir) - try: - cmd.inplace = 1 - cmd.run() - so_file = cmd.get_outputs()[0] - finally: - os.chdir(old_wd) + cmd.inplace = 1 + cmd.run() + so_file = cmd.get_outputs()[0] self.assertTrue(os.path.exists(so_file)) self.assertEqual(os.path.splitext(so_file)[-1], sysconfig.get_config_var('SO')) so_dir = os.path.dirname(so_file) - self.assertEqual(so_dir, other_tmp_dir) + self.assertEqual(so_dir, os.getcwd()) cmd.compiler = None cmd.inplace = 0 cmd.run() diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 21709f7..d5751d1 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -1547,16 +1547,5 @@ if __name__ == '__main__': if not os.path.exists(TEMPDIR): os.mkdir(TEMPDIR) - # Define a writable temp dir that will be used as cwd while running - # the tests. The name of the dir includes the pid to allow parallel - # testing (see the -j option). - TESTCWD = 'test_python_{}'.format(os.getpid()) - - TESTCWD = os.path.join(TEMPDIR, TESTCWD) - - # Run the tests in a context manager that temporary changes the CWD to a - # temporary and writable directory. If it's not possible to create or - # change the CWD, the original CWD will be used. The original CWD is - # available from test_support.SAVEDCWD. - with test_support.temp_cwd(TESTCWD, quiet=True): - main() + # do not change directory, because it breaks distutils tests + main() |