[Python-checkins] bpo-17085: test_socket: cancel scheduled alarm on test failure (#3505)

Victor Stinner webhook-mailer at python.org
Mon Sep 11 18:31:20 EDT 2017


https://github.com/python/cpython/commit/40996d3f6fbd1adcb2e69e426fa311aaf90762ff
commit: 40996d3f6fbd1adcb2e69e426fa311aaf90762ff
branch: 2.7
author: Victor Stinner <victor.stinner at gmail.com>
committer: GitHub <noreply at github.com>
date: 2017年09月11日T15:31:16-07:00
summary:
bpo-17085: test_socket: cancel scheduled alarm on test failure (#3505)
(cherry picked from commit 71fe8c00f6e2eda39d90c225c5f7635268cc4653)
files:
M Lib/test/test_socket.py
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 2b20a791501..bef18728226 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -733,6 +733,7 @@ def raising_handler(*args):
 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()


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /