MCPcopy Index your code
hub / github.com/numpy/numpy / test_warning_calls

Function test_warning_calls

numpy/tests/test_warnings.py:64–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62
63@pytest.mark.slow
64def test_warning_calls():
65 # combined "ignore" and stacklevel error
66 base = Path(numpy.__file__).parent
67
68 for path in base.rglob("*.py"):
69 if base / "testing" in path.parents:
70 continue
71 if path == base / "__init__.py":
72 continue
73 if path == base / "random" / "__init__.py":
74 continue
75 if path == base / "conftest.py":
76 continue
77 # use tokenize to auto-detect encoding on systems where no
78 # default encoding is defined (e.g. LANG='C')
79 with tokenize.open(str(path)) as file:
80 tree = ast.parse(file.read())
81 FindFuncs(path).visit(tree)

Callers

nothing calls this directly

Calls 5

FindFuncsClass · 0.85
visitMethod · 0.80
openMethod · 0.45
parseMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…