Skip to content

Commit 59bca2d

Browse files
committed
Fix message for coroutine test
1 parent 0ac8a1c commit 59bca2d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_coroutines.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ async def foo():
10081008
return (await Awaitable())
10091009

10101010
with self.assertRaisesRegex(
1011-
TypeError, "__await__.*returned non-iterator of type"):
1011+
TypeError, "__await__.*must return type iterator of type"):
10121012

10131013
run_async(foo())
10141014

@@ -1106,7 +1106,7 @@ async def foo():
11061106
return await Awaitable()
11071107

11081108
with self.assertRaisesRegex(
1109-
TypeError, r"__await__\(\) returned a coroutine"):
1109+
TypeError, r"__await__\(\) must return type iterator \(not coroutine\)"):
11101110
run_async(foo())
11111111

11121112
c.close()
@@ -1120,7 +1120,7 @@ async def foo():
11201120
return await Awaitable()
11211121

11221122
with self.assertRaisesRegex(
1123-
TypeError, "__await__.*returned non-iterator of type"):
1123+
TypeError, "__await__.*must return type iterator of type"):
11241124

11251125
run_async(foo())
11261126

@@ -2490,7 +2490,7 @@ async def foo():
24902490
return (await future)
24912491

24922492
with self.assertRaisesRegex(
2493-
TypeError, "__await__.*returned non-iterator of type 'int'"):
2493+
TypeError, "__await__.*must return type iterator of type 'int'"):
24942494
self.assertEqual(foo().send(None), 1)
24952495

24962496

0 commit comments

Comments
 (0)