diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-17 10:49:17 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-17 10:49:17 +0100 |
commit | 194b344c9eea9f92e267c1ee2ede21c86cb2715c (patch) | |
tree | 70fda52cd3f00741b5f8a527e94f8f15b93cf3f7 /Lib/test/test_signal.py | |
parent | 8589863678cdd057f57d70d2763e30677426c28c (diff) | |
download | cpython-194b344c9eea9f92e267c1ee2ede21c86cb2715c.tar.gz |
Revert changeset d927047b1d8eb87738676980a24930d053ba2150
Sorry, it was a mistake, the patch is still under review: issue #23646.
Diffstat (limited to 'Lib/test/test_signal.py')
-rw-r--r-- | Lib/test/test_signal.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 6ecff9e213..774fc809a1 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -419,20 +419,17 @@ class WakeupSignalTests(unittest.TestCase): TIMEOUT_HALF = 5 signal.alarm(1) - + before_time = time.time() # We attempt to get a signal during the sleep, # before select is called - try: - select.select([], [], [], TIMEOUT_FULL) - except InterruptedError: - pass - else: - raise Exception("select() was not interrupted") - - before_time = time.time() + time.sleep(TIMEOUT_FULL) + mid_time = time.time() + dt = mid_time - before_time + if dt >= TIMEOUT_HALF: + raise Exception("%s >= %s" % (dt, TIMEOUT_HALF)) select.select([read], [], [], TIMEOUT_FULL) after_time = time.time() - dt = after_time - before_time + dt = after_time - mid_time if dt >= TIMEOUT_HALF: raise Exception("%s >= %s" % (dt, TIMEOUT_HALF)) """, signal.SIGALRM) |