summaryrefslogtreecommitdiff
path: root/Lib/test/test_exceptions.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-07-27 14:19:18 -0700
committerGitHub <noreply@github.com>2021-07-27 14:19:18 -0700
commit68e3dca0687c4c8e61ed98aed82f81049880c0ce (patch)
tree09303b22a3cfb3c9e788ceb4219840200ff42b00 /Lib/test/test_exceptions.py
parentb977f8510e2ff4f11e3bda920722098a242fc8cc (diff)
downloadcpython-git-68e3dca0687c4c8e61ed98aed82f81049880c0ce.tar.gz
bpo-34013: Move the Python 2 hints from the exception constructor to the parser (GH-27392)
(cherry picked from commit ecc3c8e4216958d85385bf2467441c975128f26c) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r--Lib/test/test_exceptions.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 8caac2c3a9..8ffebebaeb 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -168,21 +168,19 @@ class ExceptionTests(unittest.TestCase):
self.fail("failed to get expected SyntaxError")
s = '''print "old style"'''
- ckmsg(s, "Missing parentheses in call to 'print'. "
- "Did you mean print(\"old style\")?")
+ ckmsg(s, "Missing parentheses in call to 'print'. Did you mean print(...)?")
s = '''print "old style",'''
- ckmsg(s, "Missing parentheses in call to 'print'. "
- "Did you mean print(\"old style\", end=\" \")?")
+ ckmsg(s, "Missing parentheses in call to 'print'. Did you mean print(...)?")
s = 'print f(a+b,c)'
- ckmsg(s, "Missing parentheses in call to 'print'.")
+ ckmsg(s, "Missing parentheses in call to 'print'. Did you mean print(...)?")
s = '''exec "old style"'''
- ckmsg(s, "Missing parentheses in call to 'exec'")
+ ckmsg(s, "Missing parentheses in call to 'exec'. Did you mean exec(...)?")
s = 'exec f(a+b,c)'
- ckmsg(s, "Missing parentheses in call to 'exec'.")
+ ckmsg(s, "Missing parentheses in call to 'exec'. Did you mean exec(...)?")
# should not apply to subclasses, see issue #31161
s = '''if True:\nprint "No indent"'''