[Python-checkins] r66833 - python/branches/release26-maint/Lib/test/test_atexit.py

skip.montanaro python-checkins at python.org
Tue Oct 7 17:04:16 CEST 2008


Author: skip.montanaro
Date: Tue Oct  7 17:04:16 2008
New Revision: 66833

Log:
backport


Modified:
   python/branches/release26-maint/Lib/test/test_atexit.py

Modified: python/branches/release26-maint/Lib/test/test_atexit.py
==============================================================================
--- python/branches/release26-maint/Lib/test/test_atexit.py	(original)
+++ python/branches/release26-maint/Lib/test/test_atexit.py	Tue Oct  7 17:04:16 2008
@@ -7,13 +7,15 @@
 class TestCase(unittest.TestCase):
     def setUp(self):
         s = StringIO.StringIO()
+        self.save_stdout = sys.stdout
+        self.save_stderr = sys.stderr
         sys.stdout = sys.stderr = self.subst_io = s
         self.save_handlers = atexit._exithandlers
         atexit._exithandlers = []
 
     def tearDown(self):
-        sys.stdout = sys.__stdout__
-        sys.stderr = sys.__stderr__
+        sys.stdout = self.save_stdout
+        sys.stderr = self.save_stderr
         atexit._exithandlers = self.save_handlers
 
     def test_args(self):


More information about the Python-checkins mailing list