From 9446989a1f2f06a3829a7024231a252344fb40eb Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Fri, 23 Feb 2024 11:06:22 +0100 Subject: tests: consider that EventFD.aread might not return a future --- tests/test_simple.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') 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() -- cgit v1.2.3