Kaydet (Commit) 71fe8c00 authored tarafından Victor Stinner's avatar Victor Stinner

test_socket: cancel scheduled alarm on test failure

üst 9e0ae539
......@@ -1216,6 +1216,7 @@ class GeneralModuleTests(unittest.TestCase):
signal.alarm(1)
self.assertRaises(socket.timeout, c.sendall, b"x" * (1024**2))
finally:
signal.alarm(0)
signal.signal(signal.SIGALRM, old_alarm)
c.close()
s.close()
......
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