Skip to content

Commit b2f7b09

Browse files
committed
Python: Add false negative test case.
1 parent 99b99ef commit b2f7b09

File tree

1 file changed

+8
-0
lines changed
  • python/ql/test/3/query-tests/Statements/unreachable_suppressed

1 file changed

+8
-0
lines changed

python/ql/test/3/query-tests/Statements/unreachable_suppressed/test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,11 @@ def bar(x):
2929

3030
bar(True)
3131
bar(False)
32+
33+
# False negative
34+
35+
def fn_suppression():
36+
with suppress(Exception):
37+
raise Exception()
38+
return False
39+
return True

0 commit comments

Comments
 (0)