MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_lazy_imports

Function test_lazy_imports

lib/matplotlib/tests/test_basic.py:31–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29
30
31def test_lazy_imports():
32 source = textwrap.dedent("""
33 import sys
34
35 import matplotlib.figure
36 import matplotlib.backend_bases
37 import matplotlib.pyplot
38
39 assert 'matplotlib._tri' not in sys.modules
40 assert 'matplotlib._qhull' not in sys.modules
41 assert 'matplotlib._contour' not in sys.modules
42 assert 'urllib.request' not in sys.modules
43 """)
44
45 subprocess_run_for_testing(
46 [sys.executable, '-c', source],
47 env={**os.environ, "MPLBACKEND": "", "MATPLOTLIBRC": os.devnull},
48 check=True)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…