From 546a192e772d2b5a55d963f34a1d644159e23aaf Mon Sep 17 00:00:00 2001 From: Richard Oudkerk Date: Fri, 18 Jan 2013 12:01:53 +0000 Subject: Fix inequalities in assertions --- tulip/tasks_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tulip/tasks_test.py b/tulip/tasks_test.py index a214468..c99cb8f 100644 --- a/tulip/tasks_test.py +++ b/tulip/tasks_test.py @@ -96,7 +96,7 @@ class TaskTests(unittest.TestCase): t0 = time.monotonic() res = self.event_loop.run_until_complete(tasks.Task(foo())) t1 = time.monotonic() - self.assertTrue(t1-t0, 0.01) + self.assertTrue(t1-t0 <= 0.01) # TODO: Test different return_when values. def testWaitWithException(self): @@ -161,7 +161,7 @@ class TaskTests(unittest.TestCase): t0 = time.monotonic() res = self.event_loop.run_until_complete(tasks.Task(foo())) t1 = time.monotonic() - self.assertTrue(t1-t0, 0.01) + self.assertTrue(t1-t0 <= 0.01) def testAsCompletedWithTimeout(self): a = tasks.sleep(0.1, 'a') -- cgit v1.2.1