summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_named_expressions.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2020-01-01 02:40:58 (GMT)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>2020-01-01 02:40:58 (GMT)
commit37143a8e3b2e9245d52f4ddebbdd1c6121c96884 (patch)
treee9bd9afc1f43130581d5e9b4d2116cc97351df54 /Lib/test/test_named_expressions.py
parentba82ee894cf0f6ec9e9f6a313c870ffd2db377e6 (diff)
downloadcpython-37143a8e3b2e9245d52f4ddebbdd1c6121c96884.zip
cpython-37143a8e3b2e9245d52f4ddebbdd1c6121c96884.tar.gz
cpython-37143a8e3b2e9245d52f4ddebbdd1c6121c96884.tar.bz2
bpo-39176: Improve error message for 'named assignment' (GH-17777)
Diffstat (limited to 'Lib/test/test_named_expressions.py')
-rw-r--r--Lib/test/test_named_expressions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_named_expressions.py b/Lib/test/test_named_expressions.py
index 01e26c8..3ae557f 100644
--- a/Lib/test/test_named_expressions.py
+++ b/Lib/test/test_named_expressions.py
@@ -32,7 +32,7 @@ class NamedExpressionInvalidTest(unittest.TestCase):
def test_named_expression_invalid_06(self):
code = """((a, b) := (1, 2))"""
- with self.assertRaisesRegex(SyntaxError, "cannot use named assignment with tuple"):
+ with self.assertRaisesRegex(SyntaxError, "cannot use assignment expressions with tuple"):
exec(code, {}, {})
def test_named_expression_invalid_07(self):
@@ -90,7 +90,7 @@ class NamedExpressionInvalidTest(unittest.TestCase):
code = """(lambda: x := 1)"""
with self.assertRaisesRegex(SyntaxError,
- "cannot use named assignment with lambda"):
+ "cannot use assignment expressions with lambda"):
exec(code, {}, {})
def test_named_expression_invalid_16(self):