MCPcopy
hub / github.com/sphinx-doc/sphinx / _setup_module

Function _setup_module

tests/test_versioning.py:28–40  ·  view source on GitHub ↗
(rootdir: Path, sphinx_test_tempdir: Path)

Source from the content-addressed store, hash-verified

26
27@pytest.fixture(scope='module', autouse=True)
28def _setup_module(rootdir: Path, sphinx_test_tempdir: Path) -> Iterator[None]:
29 global original, original_uids # NoQA: PLW0603
30 srcdir = sphinx_test_tempdir / 'test-versioning'
31 if not srcdir.exists():
32 shutil.copytree(rootdir / 'test-versioning', srcdir)
33 app = SphinxTestApp(srcdir=srcdir)
34 app.builder.env._app = app
35 app.connect('doctree-resolved', on_doctree_resolved)
36 app.build()
37 original = doctrees['original']
38 original_uids = [n.uid for n in add_uids(original, is_paragraph)] # type: ignore[attr-defined]
39 yield
40 app.cleanup()
41
42
43doctrees = {}

Callers

nothing calls this directly

Calls 5

buildMethod · 0.95
cleanupMethod · 0.95
SphinxTestAppClass · 0.90
add_uidsFunction · 0.90
connectMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…