bpo-45000: Raise SyntaxError when try to delete __debug__ (GH-27947) (GH-27957)
(cherry picked from commit 551da597a0996b0fb3af425f48aa5bc63ea6b963)
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index 88503dc..43780ce 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -59,6 +59,10 @@
Traceback (most recent call last):
SyntaxError: cannot assign to __debug__
+>>> del __debug__
+Traceback (most recent call last):
+SyntaxError: cannot delete __debug__
+
>>> f() = 1
Traceback (most recent call last):
SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?