(request)
| 21 | # Save output files from doctest examples into temp dir |
| 22 | @pytest.fixture(autouse=True) |
| 23 | def _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 |
nothing calls this directly
no outgoing calls
no test coverage detected