!20 fix test failuer due to python3.11
From: @cherry530 Reviewed-by: @caodongxia Signed-off-by: @caodongxia
This commit is contained in:
commit
8ad380b462
19
fix-test-failure-due-to-python11.patch
Normal file
19
fix-test-failure-due-to-python11.patch
Normal file
@ -0,0 +1,19 @@
|
||||
--- 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)
|
||||
@ -1,12 +1,13 @@
|
||||
Name: python-urwid
|
||||
Version: 2.1.2
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: Console user interface library
|
||||
License: LGPLv2+
|
||||
URL: http://excess.org/urwid/
|
||||
Source0: https://pypi.python.org/packages/source/u/urwid/urwid-%{version}.tar.gz
|
||||
Patch0: fix-use-trio-lowlevel-instead-of-trio.patch
|
||||
Patch1: Add-script-for-detecting-character-widths-and-dumping-width-tables.patch
|
||||
Patch2: fix-test-failure-due-to-python11.patch
|
||||
|
||||
%description
|
||||
Urwid is a console user interface library for Python. It includes
|
||||
@ -42,6 +43,9 @@ PYTHON=%{__python3} %{__python3} setup.py test
|
||||
%{python3_sitearch}/urwid-%{version}*.egg-info
|
||||
|
||||
%changelog
|
||||
* Sat Jul 22 2023 xu_ping<707078654@qq.com> - 2.1.2-5
|
||||
- fix test failure due to python11
|
||||
|
||||
* Tue Jan 17 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 2.1.2-4
|
||||
- Add-script-for-detecting-character-widths-and-dumping-width-tables.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user