Commit 40996d3f authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-17085: test_socket: cancel scheduled alarm on test failure (#3505)

(cherry picked from commit 71fe8c00)
parent 004547f9
......@@ -733,6 +733,7 @@ class GeneralModuleTests(unittest.TestCase):
self.assertRaises(socket.timeout, c.sendall,
b"x" * test_support.SOCK_MAX_SIZE)
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