bpo-40334: produce specialized errors for invalid del targets (GH-19911)
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index c24d352..02ba8a8 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -801,6 +801,23 @@
del abc
del x, y, (z, xyz)
+ x, y, z = "xyz"
+ del x
+ del y,
+ del (z)
+ del ()
+
+ a, b, c, d, e, f, g = "abcdefg"
+ del a, (b, c), (d, (e, f))
+
+ a, b, c, d, e, f, g = "abcdefg"
+ del a, [b, c], (d, [e, f])
+
+ abcd = list("abcd")
+ del abcd[1:2]
+
+ compile("del a, (b[0].c, (d.e, f.g[1:2])), [h.i.j], ()", "<testcase>", "exec")
+
def test_pass_stmt(self):
# 'pass'
pass