mirror of
https://github.com/python/cpython.git
synced 2025-11-09 10:01:42 +00:00
(Merge 3.3) test_socket: cancel scheduled alarm on test failure
This commit is contained in:
commit
e726ce1f3e
1 changed files with 1 additions and 0 deletions
|
|
@ -1251,6 +1251,7 @@ def raising_handler(*args):
|
||||||
signal.alarm(1)
|
signal.alarm(1)
|
||||||
self.assertRaises(socket.timeout, c.sendall, b"x" * (1024**2))
|
self.assertRaises(socket.timeout, c.sendall, b"x" * (1024**2))
|
||||||
finally:
|
finally:
|
||||||
|
signal.alarm(0)
|
||||||
signal.signal(signal.SIGALRM, old_alarm)
|
signal.signal(signal.SIGALRM, old_alarm)
|
||||||
c.close()
|
c.close()
|
||||||
s.close()
|
s.close()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue