From 457ab068a38c806e68e254c65d41c695256e15a0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 5 Jan 2011 23:47:00 +0000 Subject: [PATCH] test_atexit: fix code saving/restoring stdout and stderr That's why I prefer a single instruction per line :-) --- Lib/test/test_atexit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_atexit.py b/Lib/test/test_atexit.py index 9c7e109100e..5200af7ed91 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()