aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_coroutines.py
diff options
context:
space:
mode:
authorSteele Farnsworth <swfarnsworth@gmail.com>2024-06-17 10:48:17 -0400
committerGitHub <noreply@github.com>2024-06-17 20:18:17 +0530
commit2c7209a3bdf81a289ccd6b80a77497cfcd5732de (patch)
treec17030b4b85ca4bd6db48f2764b6e3279933d61e /Lib/test/test_coroutines.py
parenta26d27e7ee512cd822b7a7ba075171152779ffdd (diff)
downloadcpython-2c7209a3bdf81a289ccd6b80a77497cfcd5732de.tar.gz
cpython-2c7209a3bdf81a289ccd6b80a77497cfcd5732de.zip
gh-114091: Reword error message for unawaitable types (#114090)
Reword error message for unawaitable types.
Diffstat (limited to 'Lib/test/test_coroutines.py')
-rw-r--r--Lib/test/test_coroutines.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
index f705f4f5bfb..a677301c62b 100644
--- a/Lib/test/test_coroutines.py
+++ b/Lib/test/test_coroutines.py
@@ -974,13 +974,13 @@ class CoroutineTest(unittest.TestCase):
async def foo():
await 1
- with self.assertRaisesRegex(TypeError, "object int can.t.*await"):
+ with self.assertRaisesRegex(TypeError, "'int' object can.t be awaited"):
run_async(foo())
def test_await_2(self):
async def foo():
await []
- with self.assertRaisesRegex(TypeError, "object list can.t.*await"):
+ with self.assertRaisesRegex(TypeError, "'list' object can.t be awaited"):
run_async(foo())
def test_await_3(self):
@@ -1040,7 +1040,7 @@ class CoroutineTest(unittest.TestCase):
async def foo(): return await Awaitable()
with self.assertRaisesRegex(
- TypeError, "object Awaitable can't be used in 'await' expression"):
+ TypeError, "'Awaitable' object can't be awaited"):
run_async(foo())