diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-10-11 00:49:57 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-10-11 00:49:57 (GMT) |
commit | f10a79aad4e2fc62d2c3675e89f873b22b185e7b (patch) | |
tree | 06b042ca03a71663d26ad95949807d1bd2472bf4 /Lib/test/test_atexit.py | |
parent | 2d8dcdcb06005858e87eded012ceff10920445b7 (diff) | |
download | cpython-f10a79aad4e2fc62d2c3675e89f873b22b185e7b.zip cpython-f10a79aad4e2fc62d2c3675e89f873b22b185e7b.tar.gz cpython-f10a79aad4e2fc62d2c3675e89f873b22b185e7b.tar.bz2 |
merge from trunk
Diffstat (limited to 'Lib/test/test_atexit.py')
-rw-r--r-- | Lib/test/test_atexit.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_atexit.py b/Lib/test/test_atexit.py index 04af9fb..8a71036 100644 --- a/Lib/test/test_atexit.py +++ b/Lib/test/test_atexit.py @@ -26,12 +26,13 @@ def raise2(): class TestCase(unittest.TestCase): def setUp(self): self.stream = io.StringIO() + self.save_stdout, self.save_stderr = sys.stderr, sys.stdout sys.stdout = sys.stderr = self.stream atexit._clear() def tearDown(self): - sys.stdout = sys.__stdout__ - sys.stderr = sys.__stderr__ + sys.stdout = self.save_stdout + sys.stderr = self.save_stderr atexit._clear() def test_args(self): |