summaryrefslogtreecommitdiff
path: root/dev-python/urwid/files/urwid-2.1.2-fix-py3.11.patch
blob: dd60b8a220b97ad227f21f524f874a2fd32b3db6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
https://github.com/urwid/urwid/pull/517
From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= <mail@dotlambda.de>
Date: Fri, 20 Jan 2023 11:37:15 -0800
Subject: [PATCH] make tests compatible with Python 3.11

--- a/urwid/tests/test_event_loops.py
+++ b/urwid/tests/test_event_loops.py
@@ -201,15 +201,14 @@ def test_error(self):
             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)