diff options
author | Robert Schütz <github@dotlambda.de> | 2023-03-28 10:09:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-28 19:09:07 +0200 |
commit | b593cf7645b6b9b5377945313f04f0d6a293fbfb (patch) | |
tree | 1b4a48eec11b842ce6163ee93d03cad9920a7b55 | |
parent | 95c15ce0b991b28f178498dea18f4e89d22d783c (diff) | |
download | urwid-b593cf7645b6b9b5377945313f04f0d6a293fbfb.tar.gz |
make tests compatible with Python 3.11 (#517)
squash and merge
-rw-r--r-- | urwid/tests/test_event_loops.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/urwid/tests/test_event_loops.py b/urwid/tests/test_event_loops.py index d4afe9c..0e94812 100644 --- a/urwid/tests/test_event_loops.py +++ b/urwid/tests/test_event_loops.py @@ -201,15 +201,14 @@ else: evl.alarm(0.5, lambda: 1 / 0) # Simulate error in event loop self.assertRaises(ZeroDivisionError, evl.run) - def test_coroutine_error(self): + async def test_coroutine_error(self): evl = self.evl - @asyncio.coroutine - def error_coro(): + async def error_coro(): result = 1 / 0 # Simulate error in coroutine yield result - asyncio.ensure_future(error_coro()) + asyncio.ensure_future(await error_coro()) self.assertRaises(ZeroDivisionError, evl.run) |