Skip to content
Merged
Prev Previous commit
Next Next commit
Update some tests to the new errors
  • Loading branch information
pablogsal committed May 15, 2020
commit 349ea59b84f34d5ad3af3c23cfe4876e8d4d6443
2 changes: 1 addition & 1 deletion Lib/test/test_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1921,7 +1921,7 @@ def printsolution(self, x):
>>> def f(): (yield bar) += y
Traceback (most recent call last):
...
SyntaxError: yield expression is an illegal expression for augmented assignment
SyntaxError: 'yield expression' is an illegal expression for augmented assignment


Now check some throw() conditions:
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_genexps.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
>>> (y for y in (1,2)) += 10
Traceback (most recent call last):
...
SyntaxError: generator expression is an illegal expression for augmented assignment
SyntaxError: 'generator expression' is an illegal expression for augmented assignment


########### Tests borrowed from or inspired by test_generators.py ############
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_peg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ def f():
("(a, b): int", "only single target (not tuple) can be annotated"),
("[a, b]: int", "only single target (not list) can be annotated"),
("a(): int", "illegal target for annotation"),
("1 += 1", "cannot assign to literal"),
("1 += 1", "'literal' is an illegal expression for augmented assignment"),
("pass\n pass", "unexpected indent"),
("def f():\npass", "expected an indented block"),
("def f(*): pass", "named arguments must follow bare *"),
Expand Down