summaryrefslogtreecommitdiffstats
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.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index a9193b0..b22a96b 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -1265,12 +1265,22 @@ Incomplete dictionary literals
Traceback (most recent call last):
SyntaxError: expression expected after dictionary key and ':'
- # Ensure that the error is not raise for syntax errors that happen after sets
+ # Ensure that the error is not raised for syntax errors that happen after sets
>>> {1} $
Traceback (most recent call last):
SyntaxError: invalid syntax
+ # Ensure that the error is not raised for invalid expressions
+
+ >>> {1: 2, 3: foo(,), 4: 5}
+ Traceback (most recent call last):
+ SyntaxError: invalid syntax
+
+ >>> {1: $, 2: 3}
+ Traceback (most recent call last):
+ SyntaxError: invalid syntax
+
Specialized indentation errors:
>>> while condition: