]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Relax this timing-sensitive test
authorBen Darnell <ben@bendarnell.com>
Sat, 3 May 2014 16:09:35 +0000 (12:09 -0400)
committerBen Darnell <ben@bendarnell.com>
Sat, 3 May 2014 16:09:35 +0000 (12:09 -0400)
tornado/test/ioloop_test.py

index ff26bde1e11699232166078c64c703d83418664b..3060c6c2cd2c52a93eddf0f005d2f5ccd4fb05b3 100644 (file)
@@ -51,7 +51,8 @@ class TestIOLoop(AsyncTestCase):
         thread = threading.Thread(target=target)
         self.io_loop.add_callback(thread.start)
         self.wait()
-        self.assertAlmostEqual(time.time(), self.stop_time, places=2)
+        delta = time.time() - self.stop_time
+        self.assertLess(delta, 0.1)
         thread.join()
 
     def test_add_timeout_timedelta(self):