Skip to content

Commit 1b5a2bb

Browse files
committed
Add test case for del statement
1 parent 54f528e commit 1b5a2bb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/expressions/test_interpreter_error_handling.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,3 +505,14 @@ def test_raise_error_handling():
505505
"""
506506
)
507507
)
508+
509+
510+
def test_delete_attribute_error_handling():
511+
parser = ExpressionsParser()
512+
interpreter = ExpressionsInterpreter()
513+
514+
code = """
515+
del _
516+
"""
517+
with pytest.raises(SyntaxError):
518+
interpreter.execute(parser.parse(code))

0 commit comments

Comments
 (0)