summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_syntax.py
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2023-10-12 09:02:02 (GMT)
committerGitHub <noreply@github.com>2023-10-12 09:02:02 (GMT)
commit3d180347ae73119bb51500efeeafdcd62bcc6f78 (patch)
treeabbed868b602e330ce9880552f5a64c4b24557d7 /Lib/test/test_syntax.py
parentec5622d1977c03960883547f7b8f55c26ac85df2 (diff)
downloadcpython-3d180347ae73119bb51500efeeafdcd62bcc6f78.zip
cpython-3d180347ae73119bb51500efeeafdcd62bcc6f78.tar.gz
cpython-3d180347ae73119bb51500efeeafdcd62bcc6f78.tar.bz2
gh-110696: Fix incorrect syntax error message for incorrect argument unpacking (#110706)
Diffstat (limited to 'Lib/test/test_syntax.py')
-rw-r--r--Lib/test/test_syntax.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index 4c98838..52fc357 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -1955,6 +1955,17 @@ Invalid expressions in type scopes:
...
SyntaxError: yield expression cannot be used within the definition of a generic
+ >>> f(**x, *y)
+ Traceback (most recent call last):
+ SyntaxError: iterable argument unpacking follows keyword argument unpacking
+
+ >>> f(**x, *)
+ Traceback (most recent call last):
+ SyntaxError: iterable argument unpacking follows keyword argument unpacking
+
+ >>> f(x, *:)
+ Traceback (most recent call last):
+ SyntaxError: invalid syntax
"""
import re