summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-12-19 16:10:44 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-12-19 16:10:44 (GMT)
commit4d825b45a07353d180754642b759ff10eaa204f2 (patch)
tree7ab2170af9da2b0d64cb02ae67c6e611d9b0c376 /Lib/test/test_asyncio
parent1b9763d0a9c62c13dc2a06770032e5906b610c96 (diff)
downloadcpython-4d825b45a07353d180754642b759ff10eaa204f2.zip
cpython-4d825b45a07353d180754642b759ff10eaa204f2.tar.gz
cpython-4d825b45a07353d180754642b759ff10eaa204f2.tar.bz2
asyncio: IocpProactor.wait_for_handle() test now also checks the result of the
future
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r--Lib/test/test_asyncio/test_windows_events.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_windows_events.py b/Lib/test/test_asyncio/test_windows_events.py
index b4d9398..9b264a6 100644
--- a/Lib/test/test_asyncio/test_windows_events.py
+++ b/Lib/test/test_asyncio/test_windows_events.py
@@ -98,8 +98,10 @@ class ProactorTests(test_utils.TestCase):
# result should be False at timeout
fut = self.loop._proactor.wait_for_handle(event, 0.5)
start = self.loop.time()
- self.loop.run_until_complete(fut)
+ done = self.loop.run_until_complete(fut)
elapsed = self.loop.time() - start
+
+ self.assertEqual(done, False)
self.assertFalse(fut.result())
self.assertTrue(0.48 < elapsed < 0.9, elapsed)
@@ -109,8 +111,10 @@ class ProactorTests(test_utils.TestCase):
# result should be True immediately
fut = self.loop._proactor.wait_for_handle(event, 10)
start = self.loop.time()
- self.loop.run_until_complete(fut)
+ done = self.loop.run_until_complete(fut)
elapsed = self.loop.time() - start
+
+ self.assertEqual(done, True)
self.assertTrue(fut.result())
self.assertTrue(0 <= elapsed < 0.3, elapsed)