Commit e726ce1f authored by Victor Stinner's avatar Victor Stinner

(Merge 3.3) test_socket: cancel scheduled alarm on test failure

parents 3a7dffa4 71fe8c00
......@@ -1251,6 +1251,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