diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-01-05 23:47:00 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-01-05 23:47:00 (GMT) |
commit | 457ab068a38c806e68e254c65d41c695256e15a0 (patch) | |
tree | e0538ac1494f8d52ff713c1f4457996071587b29 /Lib/test/test_atexit.py | |
parent | 73efd621fb464cc3c90080848a9495cd7d42dd59 (diff) | |
download | cpython-457ab068a38c806e68e254c65d41c695256e15a0.zip cpython-457ab068a38c806e68e254c65d41c695256e15a0.tar.gz cpython-457ab068a38c806e68e254c65d41c695256e15a0.tar.bz2 |
test_atexit: fix code saving/restoring stdout and stderr
That's why I prefer a single instruction per line :-)
Diffstat (limited to 'Lib/test/test_atexit.py')
-rw-r--r-- | Lib/test/test_atexit.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_atexit.py b/Lib/test/test_atexit.py index 9c7e109..5200af7 100644 --- a/Lib/test/test_atexit.py +++ b/Lib/test/test_atexit.py @@ -25,8 +25,9 @@ def raise2(): class TestCase(unittest.TestCase): def setUp(self): + self.save_stdout = sys.stdout + self.save_stderr = sys.stderr self.stream = io.StringIO() - self.save_stdout, self.save_stderr = sys.stderr, sys.stdout sys.stdout = sys.stderr = self.stream atexit._clear() |