Skip to content

Commit 40996d3

Browse files
authored
bpo-17085: test_socket: cancel scheduled alarm on test failure (#3505)
(cherry picked from commit 71fe8c0)
1 parent 004547f commit 40996d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Lib/test/test_socket.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ def raising_handler(*args):
733733
self.assertRaises(socket.timeout, c.sendall,
734734
b"x" * test_support.SOCK_MAX_SIZE)
735735
finally:
736+
signal.alarm(0)
736737
signal.signal(signal.SIGALRM, old_alarm)
737738
c.close()
738739
s.close()

0 commit comments

Comments
 (0)