[Python-checkins] r76046 - in python/branches/release26-maint: Lib/distutils/tests/test_build_py.py

tarek.ziade python-checkins at python.org
Mon Nov 2 00:17:51 CET 2009


Author: tarek.ziade
Date: Mon Nov  2 00:17:51 2009
New Revision: 76046

Log:
Merged revisions 76042 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76042 | tarek.ziade | 2009-11-01 23:33:45 +0100 (Sun, 01 Nov 2009) | 1 line
  
  fixed stdout alteration in test_distutils
........


Modified:
   python/branches/release26-maint/   (props changed)
   python/branches/release26-maint/Lib/distutils/tests/test_build_py.py

Modified: python/branches/release26-maint/Lib/distutils/tests/test_build_py.py
==============================================================================
--- python/branches/release26-maint/Lib/distutils/tests/test_build_py.py	(original)
+++ python/branches/release26-maint/Lib/distutils/tests/test_build_py.py	Mon Nov  2 00:17:51 2009
@@ -69,6 +69,7 @@
         open(os.path.join(testdir, "testfile"), "w").close()
 
         os.chdir(sources)
+        old_stdout = sys.stdout
         sys.stdout = StringIO.StringIO()
 
         try:
@@ -87,7 +88,7 @@
         finally:
             # Restore state.
             os.chdir(cwd)
-            sys.stdout = sys.__stdout__
+            sys.stdout = old_stdout
 
 def test_suite():
     return unittest.makeSuite(BuildPyTestCase)


More information about the Python-checkins mailing list