summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2008-10-07 15:04:16 (GMT)
committerSkip Montanaro <skip@pobox.com>2008-10-07 15:04:16 (GMT)
commit001befaadcf562170039e085ebd4ae3318f322c2 (patch)
tree0286ed4d439684127ad26fe5e05037a1d4014a3d /Lib
parent8cf7ef4333838e0812cdb25e13b60207b2146d7a (diff)
downloadcpython-001befaadcf562170039e085ebd4ae3318f322c2.zip
cpython-001befaadcf562170039e085ebd4ae3318f322c2.tar.gz
cpython-001befaadcf562170039e085ebd4ae3318f322c2.tar.bz2
backport
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_atexit.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_atexit.py b/Lib/test/test_atexit.py
index 3c6043d..0ff6e53 100644
--- a/Lib/test/test_atexit.py
+++ b/Lib/test/test_atexit.py
@@ -7,13 +7,15 @@ from test import test_support
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):