MCPcopy Create free account
hub / github.com/apache/arrow / _docdir

Function _docdir

docs/source/python/conftest.py:23–36  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

21# Save output files from doctest examples into temp dir
22@pytest.fixture(autouse=True)
23def _docdir(request):
24 # Trigger ONLY for the doctests
25 from _pytest.doctest import DoctestItem
26 is_doctest = isinstance(request.node, DoctestItem)
27
28 if is_doctest:
29 # Get the fixture dynamically by its name.
30 tmpdir = request.getfixturevalue('tmpdir')
31
32 # Chdir only for the duration of the test.
33 with tmpdir.as_cwd():
34 yield
35 else:
36 yield

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected