aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_syntax.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_syntax.py')
-rw-r--r--Lib/test/test_syntax.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index d5a52ba628a..c77aafeb363 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -152,6 +152,14 @@ SyntaxError: expected 'else' after 'if' expression
Traceback (most recent call last):
SyntaxError: expected 'else' after 'if' expression
+>>> if True:
+... print("Hello"
+...
+... if 2:
+... print(123))
+Traceback (most recent call last):
+SyntaxError: invalid syntax
+
>>> True = True = 3
Traceback (most recent call last):
SyntaxError: cannot assign to True