diff options
author | Guido van Rossum <guido@dropbox.com> | 2013-10-18 22:15:56 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@dropbox.com> | 2013-10-18 22:15:56 (GMT) |
commit | 051a33148813d045c33745ccd0e9e20e96b1bb6f (patch) | |
tree | 8d323d01c549cc8f32355de956a21a8919f7a8f6 /Lib/test/test_asyncio | |
parent | ee1be99e050db5ec2db534a2a28beb12ccf159de (diff) | |
download | cpython-051a33148813d045c33745ccd0e9e20e96b1bb6f.zip cpython-051a33148813d045c33745ccd0e9e20e96b1bb6f.tar.gz cpython-051a33148813d045c33745ccd0e9e20e96b1bb6f.tar.bz2 |
Relax some asyncio test timeouts (http://bugs.python.org/issue19285).
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r-- | Lib/test/test_asyncio/test_base_events.py | 2 | ||||
-rw-r--r-- | Lib/test/test_asyncio/test_events.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py index e62f476..db15244 100644 --- a/Lib/test/test_asyncio/test_base_events.py +++ b/Lib/test/test_asyncio/test_base_events.py @@ -121,7 +121,7 @@ class BaseEventLoopTests(unittest.TestCase): t0 = self.loop.time() self.loop.run_forever() t1 = self.loop.time() - self.assertTrue(0.09 <= t1-t0 <= 0.12, t1-t0) + self.assertTrue(0.09 <= t1-t0 <= 0.9, t1-t0) def test_run_once_in_executor_handle(self): def cb(): diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 2e89f72..4921e7f 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -215,7 +215,7 @@ class EventLoopTestsMixin: t0 = self.loop.time() self.loop.run_until_complete(tasks.sleep(0.1, loop=self.loop)) t1 = self.loop.time() - self.assertTrue(0.08 <= t1-t0 <= 0.12, t1-t0) + self.assertTrue(0.08 <= t1-t0 <= 0.8, t1-t0) def test_run_until_complete_stopped(self): @tasks.coroutine @@ -238,7 +238,7 @@ class EventLoopTestsMixin: self.loop.run_forever() t1 = time.monotonic() self.assertEqual(results, ['hello world']) - self.assertTrue(0.08 <= t1-t0 <= 0.2, t1-t0) + self.assertTrue(0.08 <= t1-t0 <= 0.8, t1-t0) def test_call_soon(self): results = [] @@ -462,8 +462,8 @@ class EventLoopTestsMixin: self.loop.add_signal_handler(signal.SIGALRM, my_handler, *some_args) - signal.setitimer(signal.ITIMER_REAL, 0.01, 0) # Send SIGALRM once. - self.loop.call_later(0.015, self.loop.stop) + signal.setitimer(signal.ITIMER_REAL, 0.1, 0) # Send SIGALRM once. + self.loop.call_later(0.5, self.loop.stop) self.loop.run_forever() self.assertEqual(caught, 1) |