From 1e66ed0b1caee2e58cbafce80fc177330a19126e Mon Sep 17 00:00:00 2001 From: Mattreex <45504048+mattreex@users.noreply.github.com> Date: Wed, 29 Jul 2020 09:58:18 -0500 Subject: [PATCH] Warn about --basetemp removing the entire directory (#7555) Co-authored-by: mattreex Co-authored-by: Bruno Oliveira --- doc/en/tmpdir.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/en/tmpdir.rst b/doc/en/tmpdir.rst index a3749d855a4..5f882b1400f 100644 --- a/doc/en/tmpdir.rst +++ b/doc/en/tmpdir.rst @@ -192,8 +192,13 @@ You can override the default temporary directory setting like this: pytest --basetemp=mydir -When distributing tests on the local machine, ``pytest`` takes care to -configure a basetemp directory for the sub processes such that all temporary +.. warning:: + + The contents of ``mydir`` will be completely removed, so make sure to use a directory + for that purpose only. + +When distributing tests on the local machine using ``pytest-xdist``, care is taken to +automatically configure a basetemp directory for the sub processes such that all temporary data lands below a single per-test run basetemp directory. .. _`py.path.local`: https://py.readthedocs.io/en/latest/path.html