aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_syntax.py
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2021-05-08 19:24:41 +0100
committerGitHub <noreply@github.com>2021-05-08 11:24:41 -0700
commit6692dc1ca99fb34a19d0a4b93cf8e10619490001 (patch)
treeb40089c354338ace9a5fcd3c9739288b20077ad4 /Lib/test/test_syntax.py
parent873275e64aae4caa6ddcea28ca3a026f37659d58 (diff)
downloadcpython-6692dc1ca99fb34a19d0a4b93cf8e10619490001.tar.gz
cpython-6692dc1ca99fb34a19d0a4b93cf8e10619490001.zip
bpo-43149: Correct the syntax error message for multiple exception types (GH-25996)
Automerge-Triggered-By: GH:pablogsal
Diffstat (limited to 'Lib/test/test_syntax.py')
-rw-r--r--Lib/test/test_syntax.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index 9799697b87d..58407212b49 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -1068,7 +1068,7 @@ Make sure that the old "raise X, Y[, Z]" form is gone:
...
SyntaxError: invalid syntax
-Check that an exception group with missing parentheses
+Check that an multiple exception types with missing parentheses
raise a custom exception
>>> try:
@@ -1076,21 +1076,21 @@ raise a custom exception
... except A, B:
... pass
Traceback (most recent call last):
- SyntaxError: exception group must be parenthesized
+ SyntaxError: multiple exception types must be parenthesized
>>> try:
... pass
... except A, B, C:
... pass
Traceback (most recent call last):
- SyntaxError: exception group must be parenthesized
+ SyntaxError: multiple exception types must be parenthesized
>>> try:
... pass
... except A, B, C as blech:
... pass
Traceback (most recent call last):
- SyntaxError: exception group must be parenthesized
+ SyntaxError: multiple exception types must be parenthesized
>>> try:
... pass
@@ -1099,7 +1099,7 @@ raise a custom exception
... finally:
... pass
Traceback (most recent call last):
- SyntaxError: exception group must be parenthesized
+ SyntaxError: multiple exception types must be parenthesized
>>> f(a=23, a=234)