forked from pool/python-urwid
- Add python-311.patch to fix tests for python 3.11
gh#urwid/urwid#517 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urwid?expand=0&rev=46
This commit is contained in:
23
python-311.patch
Normal file
23
python-311.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
Index: urwid-2.1.2/urwid/tests/test_event_loops.py
|
||||
===================================================================
|
||||
--- urwid-2.1.2.orig/urwid/tests/test_event_loops.py
|
||||
+++ urwid-2.1.2/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)
|
||||
|
||||
|
Reference in New Issue
Block a user