summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-08-24 13:53:39 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-08-24 13:53:39 (GMT)
commite726ce1f3ed6192591d50a88b933e8806ff99a0e (patch)
treeeb03e1cdf97fb2b56bf69138c672c9f76f14594e
parent3a7dffa4cec84c94685fc9dccbded8ee41904fd5 (diff)
parent71fe8c00f6e2eda39d90c225c5f7635268cc4653 (diff)
downloadcpython-e726ce1f3ed6192591d50a88b933e8806ff99a0e.zip
cpython-e726ce1f3ed6192591d50a88b933e8806ff99a0e.tar.gz
cpython-e726ce1f3ed6192591d50a88b933e8806ff99a0e.tar.bz2
(Merge 3.3) test_socket: cancel scheduled alarm on test failure
-rw-r--r--Lib/test/test_socket.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 54fb9a1..c7a52d8 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -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()