summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_atexit.py
diff options
context:
space:
mode:
authorSteven Bethard <steven.bethard@gmail.com>2008-03-18 19:59:14 (GMT)
committerSteven Bethard <steven.bethard@gmail.com>2008-03-18 19:59:14 (GMT)
commita7a3e28e4e6f7084e4d29e2c6d0ac95b8956648e (patch)
treec8d30d4722c60e437a0edfef00e192df3f727c1a /Lib/test/test_atexit.py
parentf48da8fbcdcf8c9eac2553131a07b8b375c0d726 (diff)
downloadcpython-a7a3e28e4e6f7084e4d29e2c6d0ac95b8956648e.zip
cpython-a7a3e28e4e6f7084e4d29e2c6d0ac95b8956648e.tar.gz
cpython-a7a3e28e4e6f7084e4d29e2c6d0ac95b8956648e.tar.bz2
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.)
Diffstat (limited to 'Lib/test/test_atexit.py')
-rw-r--r--Lib/test/test_atexit.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_atexit.py b/Lib/test/test_atexit.py
index 684d607..bea482f 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()