From: Ben Darnell Date: Sat, 3 May 2014 16:09:35 +0000 (-0400) Subject: Relax this timing-sensitive test X-Git-Tag: v4.0.0b1~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab27cabc9a46cae67cf0a7e3af4b3a5dcd6a56df;p=thirdparty%2Ftornado.git Relax this timing-sensitive test --- diff --git a/tornado/test/ioloop_test.py b/tornado/test/ioloop_test.py index ff26bde1e..3060c6c2c 100644 --- a/tornado/test/ioloop_test.py +++ b/tornado/test/ioloop_test.py @@ -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):