(request)
| 264 | # Save output files from doctest examples into temp dir |
| 265 | @pytest.fixture(autouse=True) |
| 266 | def _docdir(request): |
| 267 | |
| 268 | # Trigger ONLY for the doctests |
| 269 | doctest_m = request.config.option.doctestmodules |
| 270 | doctest_c = getattr(request.config.option, "doctest_cython", False) |
| 271 | |
| 272 | if doctest_m or doctest_c: |
| 273 | |
| 274 | # Get the fixture dynamically by its name. |
| 275 | tmpdir = request.getfixturevalue('tmpdir') |
| 276 | |
| 277 | # Chdir only for the duration of the test. |
| 278 | with tmpdir.as_cwd(): |
| 279 | yield |
| 280 | |
| 281 | else: |
| 282 | yield |
| 283 | |
| 284 | |
| 285 | # Define doctest_namespace for fs module docstring import |
nothing calls this directly
no outgoing calls
no test coverage detected