From 57f8f5d2b313b9601872a1184a809060468a606e Mon Sep 17 00:00:00 2001 From: Gabor Szabo Date: Fri, 4 Feb 2022 14:38:26 +0200 Subject: [PATCH] Mention basetemp in docs as a way to only keep last temp dir (#9607) Closes #9599 --- doc/en/how-to/tmp_path.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/en/how-to/tmp_path.rst b/doc/en/how-to/tmp_path.rst index ebd74d42e..b261a5563 100644 --- a/doc/en/how-to/tmp_path.rst +++ b/doc/en/how-to/tmp_path.rst @@ -121,6 +121,10 @@ the system temporary directory. The base name will be ``pytest-NUM`` where ``NUM`` will be incremented with each test run. Moreover, entries older than 3 temporary directories will be removed. +The number of entries currently cannot be changed, but using the ``--basetemp`` +option will remove the directory before every run, effectively meaning the temporary directories +of only the most recent run will be kept. + You can override the default temporary directory setting like this: .. code-block:: bash