From 71fe8c00f6e2eda39d90c225c5f7635268cc4653 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sat, 24 Aug 2013 15:52:47 +0200 Subject: [PATCH] test_socket: cancel scheduled alarm on test failure --- Lib/test/test_socket.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index fa9a65f15de..9567090e996 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -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()