[Python-checkins] r72639 - in python/branches/release30-maint: Lib/distutils/tests/test_build_ext.py Misc/NEWS
tarek.ziade
python-checkins at python.org
Thu May 14 22:22:01 CEST 2009
Author: tarek.ziade
Date: Thu May 14 22:22:00 2009
New Revision: 72639
Log:
Merged revisions 72638 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r72638 | tarek.ziade | 2009年05月14日 22:20:47 +0200 (2009年5月14日) | 9 lines
Merged revisions 72636 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72636 | tarek.ziade | 2009年05月14日 22:14:13 +0200 (2009年5月14日) | 1 line
#6022 fixed test_get_outputs so it doesn't leaves a test file in the cwd
........
................
Modified:
python/branches/release30-maint/ (props changed)
python/branches/release30-maint/Lib/distutils/tests/test_build_ext.py
python/branches/release30-maint/Misc/NEWS
Modified: python/branches/release30-maint/Lib/distutils/tests/test_build_ext.py
==============================================================================
--- python/branches/release30-maint/Lib/distutils/tests/test_build_ext.py (original)
+++ python/branches/release30-maint/Lib/distutils/tests/test_build_ext.py Thu May 14 22:22:00 2009
@@ -250,12 +250,18 @@
# 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()
Modified: python/branches/release30-maint/Misc/NEWS
==============================================================================
--- python/branches/release30-maint/Misc/NEWS (original)
+++ python/branches/release30-maint/Misc/NEWS Thu May 14 22:22:00 2009
@@ -285,6 +285,9 @@
Library
-------
+- Issue #6022: a test file was created in the current working directory by
+ test_get_outputs in Distutils.
+
- Issue #5977: distutils build_ext.get_outputs was not taking into account the
inplace option. Initial patch by kxroberto.
More information about the Python-checkins
mailing list