Skip to content

Commit f83ef8a

Browse files
committed
test(event-loop): Python 3.14 changed the error message format
1 parent 8e1bfe2 commit f83ef8a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/python/test_event_loop.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ async def c():
273273
assert "nested" == await pm.eval("(promise) => promise")(c())
274274
assert "nested" == await pm.eval("(promise) => promise")(await c())
275275
assert "nested" == await pm.eval("(promise) => promise")(await (await c()))
276-
with pytest.raises(TypeError, match="object str can't be used in 'await' expression"):
276+
with pytest.raises(TypeError, match="(object str can't be used in 'await' expression)|('str' object can't be awaited)"):
277+
# Python 3.14 changed the error message format
277278
await pm.eval("(promise) => promise")(await (await (await c())))
278279

279280
# Python awaitable throwing exceptions

0 commit comments

Comments
 (0)