MCPcopy Create free account
hub / github.com/numpy/numpy / test_warning_calls

Function test_warning_calls

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

Source from the content-addressed store, hash-verified

57
58@pytest.mark.slow
59def test_warning_calls():
60 # combined "ignore" and stacklevel error
61 base = Path(numpy.__file__).parent
62
63 for path in base.rglob("*.py"):
64 if base / "testing" in path.parents:
65 continue
66 if path == base / "__init__.py":
67 continue
68 if path == base / "random" / "__init__.py":
69 continue
70 # use tokenize to auto-detect encoding on systems where no
71 # default encoding is defined (e.g. LANG='C')
72 with tokenize.open(str(path)) as file:
73 tree = ast.parse(file.read())
74 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