Skip to content

Commit daba375

Browse files
committed
Loosen exception regexps for Python 3.14
Python 3.14 changes the exception message for passing wrong types to `await` to: TypeError: 'int' object can't be awaited Loosen the regular expression to accept both the old and the new exception message.
1 parent 58a13f3 commit daba375

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_async_py3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,15 +498,15 @@ def test_await_1(lop):
498498
async def foo():
499499
await 1
500500

501-
with pytest.raises(TypeError, match='object int can.t.*await'):
501+
with pytest.raises(TypeError, match='int.*can.t.*await'):
502502
run_async(lop.Proxy(foo))
503503

504504

505505
def test_await_2(lop):
506506
async def foo():
507507
await []
508508

509-
with pytest.raises(TypeError, match='object list can.t.*await'):
509+
with pytest.raises(TypeError, match='list.*can.t.*await'):
510510
run_async(lop.Proxy(foo))
511511

512512

0 commit comments

Comments
 (0)