1 Index: Python-2.7/Lib/distutils/tests/test_build_ext.py
2 ===================================================================
3 --- Python-2.7.orig/Lib/distutils/tests/test_build_ext.py
4 +++ Python-2.7/Lib/distutils/tests/test_build_ext.py
5 @@ -261,20 +261,14 @@ class BuildExtTestCase(support.TempdirMa
7 # issue #5977 : distutils build_ext.get_outputs
8 # returns wrong result with --inplace
9 - other_tmp_dir = os.path.realpath(self.mkdtemp())
10 - old_wd = os.getcwd()
11 - os.chdir(other_tmp_dir)
15 - so_file = cmd.get_outputs()[0]
20 + so_file = cmd.get_outputs()[0]
21 self.assertTrue(os.path.exists(so_file))
22 self.assertEqual(os.path.splitext(so_file)[-1],
23 sysconfig.get_config_var('SO'))
24 so_dir = os.path.dirname(so_file)
25 - self.assertEqual(so_dir, other_tmp_dir)
26 + self.assertEqual(so_dir, os.getcwd())
30 Index: Python-2.7/Lib/test/regrtest.py
31 ===================================================================
32 --- Python-2.7.orig/Lib/test/regrtest.py
33 +++ Python-2.7/Lib/test/regrtest.py
34 @@ -1503,16 +1503,5 @@ if __name__ == '__main__':
35 if not os.path.exists(TEMPDIR):
38 - # Define a writable temp dir that will be used as cwd while running
39 - # the tests. The name of the dir includes the pid to allow parallel
40 - # testing (see the -j option).
41 - TESTCWD = 'test_python_{}'.format(os.getpid())
43 - TESTCWD = os.path.join(TEMPDIR, TESTCWD)
45 - # Run the tests in a context manager that temporary changes the CWD to a
46 - # temporary and writable directory. If it's not possible to create or
47 - # change the CWD, the original CWD will be used. The original CWD is
48 - # available from test_support.SAVEDCWD.
49 - with test_support.temp_cwd(TESTCWD, quiet=True):
51 + # do not change directory, because it breaks distutils tests