From: Steven Bethard Date: Tue, 18 Mar 2008 19:59:14 +0000 (+0000) Subject: Fix test_atexit so that it still passes when -3 is supplied. (It was catching the... X-Git-Tag: v2.6a2~258 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a7a3e28e4e6f7084e4d29e2c6d0ac95b8956648e;p=python Fix test_atexit so that it still passes when -3 is supplied. (It was catching the warning messages on stdio from using the reload() function.) --- diff --git a/Lib/test/test_atexit.py b/Lib/test/test_atexit.py index 684d6079c1..bea482f9dd 100644 --- a/Lib/test/test_atexit.py +++ b/Lib/test/test_atexit.py @@ -41,13 +41,13 @@ class TestCase(unittest.TestCase): def test_sys_override(self): # be sure a preset sys.exitfunc is handled properly - s = StringIO.StringIO() - sys.stdout = sys.stderr = s save_handlers = atexit._exithandlers atexit._exithandlers = [] exfunc = sys.exitfunc sys.exitfunc = self.h1 reload(atexit) + s = StringIO.StringIO() + sys.stdout = sys.stderr = s try: atexit.register(self.h2) atexit._run_exitfuncs()