]> granicus.if.org Git - python/commitdiff
bpo-31008: Fix asyncio test_wait_for_handle on Windows (#3065)
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 10 Aug 2017 23:23:22 +0000 (01:23 +0200)
committerGitHub <noreply@github.com>
Thu, 10 Aug 2017 23:23:22 +0000 (01:23 +0200)
Lib/test/test_asyncio/test_windows_events.py

index 1afcae107b0dbef8b443dcb0db1359e608b56b7b..c72eef1afdb45420c8235a29f430873d219f3419 100644 (file)
@@ -118,7 +118,9 @@ class ProactorTests(test_utils.TestCase):
 
         self.assertEqual(done, False)
         self.assertFalse(fut.result())
-        self.assertTrue(0.48 < elapsed < 0.9, elapsed)
+        # bpo-31008: Tolerate only 450 ms (at least 500 ms expected),
+        # because of bad clock resolution on Windows
+        self.assertTrue(0.45 <= elapsed <= 0.9, elapsed)
 
         _overlapped.SetEvent(event)