From 6750e4e9e30f13ac63aaced69230aa2d50c7eb54 Mon Sep 17 00:00:00 2001 From: mattreex Date: Tue, 28 Jul 2020 14:10:17 -0500 Subject: [PATCH 1/4] add basetemp warning --- doc/en/tmpdir.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/en/tmpdir.rst b/doc/en/tmpdir.rst index a3749d855a4..f8229598b27 100644 --- a/doc/en/tmpdir.rst +++ b/doc/en/tmpdir.rst @@ -192,6 +192,7 @@ You can override the default temporary directory setting like this: pytest --basetemp=mydir +**Warning**: The contents of ``mydir`` will be deleted. When distributing tests on the local machine, ``pytest`` takes care to configure a basetemp directory for the sub processes such that all temporary data lands below a single per-test run basetemp directory. From 71bcde39c2f614930366a09f68b27ff5ba683e14 Mon Sep 17 00:00:00 2001 From: mattreex Date: Tue, 28 Jul 2020 14:26:20 -0500 Subject: [PATCH 2/4] modify based on PR comment --- doc/en/tmpdir.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/tmpdir.rst b/doc/en/tmpdir.rst index f8229598b27..7ec739ca989 100644 --- a/doc/en/tmpdir.rst +++ b/doc/en/tmpdir.rst @@ -192,7 +192,7 @@ You can override the default temporary directory setting like this: pytest --basetemp=mydir -**Warning**: The contents of ``mydir`` will be deleted. +.. warning:: The contents of ``mydir`` will be deleted. When distributing tests on the local machine, ``pytest`` takes care to configure a basetemp directory for the sub processes such that all temporary data lands below a single per-test run basetemp directory. From f0ccfd35e3a0b246e8d371c6f1b4d1cd1b111330 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 28 Jul 2020 16:33:56 -0300 Subject: [PATCH 3/4] Fix sphinx syntax --- doc/en/tmpdir.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/en/tmpdir.rst b/doc/en/tmpdir.rst index 7ec739ca989..96b40b95e66 100644 --- a/doc/en/tmpdir.rst +++ b/doc/en/tmpdir.rst @@ -192,9 +192,13 @@ You can override the default temporary directory setting like this: pytest --basetemp=mydir -.. warning:: The contents of ``mydir`` will be deleted. -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 From 5831c66c007a983e92e9cd1b9fd241c78b087fac Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 29 Jul 2020 11:40:03 -0300 Subject: [PATCH 4/4] Fix linting --- doc/en/tmpdir.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/en/tmpdir.rst b/doc/en/tmpdir.rst index 96b40b95e66..5f882b1400f 100644 --- a/doc/en/tmpdir.rst +++ b/doc/en/tmpdir.rst @@ -192,11 +192,11 @@ You can override the default temporary directory setting like this: pytest --basetemp=mydir -.. warning:: - +.. 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.