Merge pull request #8038 from matthewhughes934/note-tmpdir-lifetime

Docs: Note lifetime of temporary directories
This commit is contained in:
Ran Benita 2020-12-05 21:54:04 +02:00 committed by GitHub
commit 1a1bb61340
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -199,6 +199,11 @@ def tmpdir(tmp_path: Path) -> py.path.local:
function invocation, created as a sub directory of the base temporary
directory.
By default, a new base temporary directory is created each test session,
and old bases are removed after 3 sessions, to aid in debugging. If
``--basetemp`` is used then it is cleared each session. See :ref:`base
temporary directory`.
The returned object is a `py.path.local`_ path object.
.. _`py.path.local`: https://py.readthedocs.io/en/latest/path.html
@ -212,6 +217,11 @@ def tmp_path(request: FixtureRequest, tmp_path_factory: TempPathFactory) -> Path
function invocation, created as a sub directory of the base temporary
directory.
By default, a new base temporary directory is created each test session,
and old bases are removed after 3 sessions, to aid in debugging. If
``--basetemp`` is used then it is cleared each session. See :ref:`base
temporary directory`.
The returned object is a :class:`pathlib.Path` object.
"""