Skip to content

Commit 7b004c3

Browse files
committed
Python: Add test for wrong exception type
1 parent d9d86e1 commit 7b004c3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

python/ql/test/query-tests/Functions/general/protocols.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,8 @@ def __call__(self):
118118
raise StopIteration
119119

120120
def __bool__(self):
121-
raise TypeError
121+
raise TypeError
122+
123+
class BadBool(object):
124+
def __bool__(self):
125+
raise ZeroDivisionError()

0 commit comments

Comments
 (0)