summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-05-14 20:17:32 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-05-14 20:17:32 (GMT)
commitb7489a94efd170244a3282025c8bbf7cb1e4eec7 (patch)
tree2abf3a69d3ac4b577d73f3d7a92b4d208fd9b0db /Lib
parentc1f21ec1ff113adb7e7de700a8a4dc8458052329 (diff)
downloadcpython-b7489a94efd170244a3282025c8bbf7cb1e4eec7.zip
cpython-b7489a94efd170244a3282025c8bbf7cb1e4eec7.tar.gz
cpython-b7489a94efd170244a3282025c8bbf7cb1e4eec7.tar.bz2
Merged revisions 72636 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72636 | tarek.ziade | 2009-05-14 22:14:13 +0200 (Thu, 14 May 2009) | 1 line #6022 fixed test_get_outputs so it doesn't leaves a test file in the cwd ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/tests/test_build_ext.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index cf254ac..2bd2292 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -249,12 +249,18 @@ class BuildExtTestCase(support.TempdirManager,
# issue #5977 : distutils build_ext.get_outputs
# returns wrong result with --inplace
- cmd.inplace = 1
- cmd.run()
- so_file = cmd.get_outputs()[0]
+ 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)
self.assert_(os.path.exists(so_file))
so_dir = os.path.dirname(so_file)
- self.assertEquals(so_dir, os.getcwd())
+ self.assertEquals(so_dir, other_tmp_dir)
cmd.inplace = 0
cmd.run()