diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_exceptions.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 31051d4..8ebed02 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -175,9 +175,15 @@ class ExceptionTests(unittest.TestCase): ckmsg(s, "Missing parentheses in call to 'print'. " "Did you mean print(\"old style\", end=\" \")?") + s = 'print f(a+b,c)' + ckmsg(s, "Missing parentheses in call to 'print'.") + s = '''exec "old style"''' ckmsg(s, "Missing parentheses in call to 'exec'") + s = 'exec f(a+b,c)' + ckmsg(s, "Missing parentheses in call to 'exec'.") + # should not apply to subclasses, see issue #31161 s = '''if True:\nprint "No indent"''' ckmsg(s, "expected an indented block after 'if' statement on line 1", IndentationError) |