Kaydet (Commit) a7a3e28e authored tarafından Steven Bethard's avatar Steven Bethard

Fix test_atexit so that it still passes when -3 is supplied. (It was catching…

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.)
üst f48da8fb
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment