summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_simple.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_simple.py b/tests/test_simple.py
index b6f5c42..63f7804 100644
--- a/tests/test_simple.py
+++ b/tests/test_simple.py
@@ -51,11 +51,11 @@ class IDAllocationTest(unittest.TestCase):
class EventFDTest(unittest.IsolatedAsyncioTestCase):
async def test_async(self) -> None:
efd = linuxnamespaces.EventFD(1, linuxnamespaces.EventFDFlags.NONBLOCK)
- fut = efd.aread()
+ fut = asyncio.ensure_future(efd.aread())
await asyncio.sleep(0.000001) # Let the loop run
self.assertTrue(fut.done())
self.assertEqual(await fut, 1)
- fut = efd.aread()
+ fut = asyncio.ensure_future(efd.aread())
await asyncio.sleep(0.000001) # Let the loop run
self.assertFalse(fut.done())
efd.write()