Skip to content

Commit 2786831

Browse files
committed
add test
1 parent ab3862d commit 2786831

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

extra_tests/snippets/syntax_del.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,11 @@ def __del__(self):
2929
def test_del_panic():
3030
mytest = MyTest()
3131
del mytest
32+
33+
# see https://github.com/RustPython/RustPython/issues/4910
34+
35+
def f():
36+
del l
37+
38+
l = 'a'
39+
assert_raises(UnboundLocalError, f)

0 commit comments

Comments
 (0)