Skip to content

Commit f581d93

Browse files
committed
Update test_stop_iteration_leak
Now raises InferenceError instead of returning Uninferable. Still no StopIteration leak.
1 parent c4bf157 commit f581d93

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/unittest_inference.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,8 @@ def __init__(self):
17041704
"""
17051705
ast = extract_node(code, __name__)
17061706
expr = ast.func.expr
1707-
self.assertIs(next(expr.infer()), util.Uninferable)
1707+
with pytest.raises(exceptions.InferenceError):
1708+
next(expr.infer())
17081709

17091710
def test_tuple_builtin_inference(self):
17101711
code = """

0 commit comments

Comments
 (0)