From 1019b5f67ca33309abd6f11c063ff6037c6fe1cd Mon Sep 17 00:00:00 2001 From: faph Date: Wed, 17 Jan 2024 12:48:25 +0000 Subject: [PATCH] Move temp dir retention explanation to end of fixture section --- doc/en/how-to/tmp_path.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/en/how-to/tmp_path.rst b/doc/en/how-to/tmp_path.rst index ba9beaf8b..3cc5152e9 100644 --- a/doc/en/how-to/tmp_path.rst +++ b/doc/en/how-to/tmp_path.rst @@ -11,11 +11,6 @@ The ``tmp_path`` fixture You can use the ``tmp_path`` fixture which will provide a temporary directory unique to each test function. -By default, ``pytest`` retains the temporary directory for the last 3 ``pytest`` -invocations. Concurrent invocations of the same test function are supported by -configuring the base temporary directory to be unique for each concurrent -run. See `temporary directory location and retention`_ for details. - ``tmp_path`` is a :class:`pathlib.Path` object. Here is an example test usage: .. code-block:: python @@ -66,6 +61,11 @@ Running this would result in a passed test except for the last FAILED test_tmp_path.py::test_create_file - assert 0 ============================ 1 failed in 0.12s ============================= +By default, ``pytest`` retains the temporary directory for the last 3 ``pytest`` +invocations. Concurrent invocations of the same test function are supported by +configuring the base temporary directory to be unique for each concurrent +run. See `temporary directory location and retention`_ for details. + .. _`tmp_path_factory example`: The ``tmp_path_factory`` fixture