summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_atexit.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-01-05 23:47:00 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-01-05 23:47:00 (GMT)
commit457ab068a38c806e68e254c65d41c695256e15a0 (patch)
treee0538ac1494f8d52ff713c1f4457996071587b29 /Lib/test/test_atexit.py
parent73efd621fb464cc3c90080848a9495cd7d42dd59 (diff)
downloadcpython-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.py3
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()