Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
Fix tests
  • Loading branch information
eendebakpt committed Jun 24, 2025
commit 82b03dc26d36ce3de705f3c230e07aa8b27d241e
2 changes: 1 addition & 1 deletion numpy/tests/test_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def visit_Call(self, node):
ast.NodeVisitor.generic_visit(self, node)

if p.ls[-1] == 'simplefilter' or p.ls[-1] == 'filterwarnings':
if node.args[0].value == "ignore":
if if node.args and node.args[0].value == "ignore":
raise AssertionError(
"warnings should have an appropriate stacklevel; "
f"found in {self.__filename} on line {node.lineno}")
Expand Down