summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2013-01-18 12:01:53 +0000
committerRichard Oudkerk <shibturn@gmail.com>2013-01-18 12:01:53 +0000
commit546a192e772d2b5a55d963f34a1d644159e23aaf (patch)
treece9c54ef8a2c0284c3c7d396cb5127cb41bce627
parent03b4263b141114f02fb6696201c8cd4694800d69 (diff)
downloadtrollius-git-546a192e772d2b5a55d963f34a1d644159e23aaf.tar.gz
Fix inequalities in assertions
-rw-r--r--tulip/tasks_test.py4
1 files 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')