summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasilis Gerakaris <vgerak@gmail.com>2020-10-28 13:23:35 +0200
committerGitHub <noreply@github.com>2020-10-28 08:23:35 -0300
commita431310c0a36b83907c87087c84c246fbffdd2fa (patch)
treeb98f1eeb14928a7f1844f573b3de6482a7d73d78
parent78c09b99319d4d18d7f31b2941616ec4903d3092 (diff)
downloadpytest-a431310c0a36b83907c87087c84c246fbffdd2fa.tar.gz
Increase temp dir deletion period to 3 days (#7914)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
-rw-r--r--changelog/7911.bugfix.rst1
-rw-r--r--src/_pytest/pathlib.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog/7911.bugfix.rst b/changelog/7911.bugfix.rst
new file mode 100644
index 000000000..5b85b20b5
--- /dev/null
+++ b/changelog/7911.bugfix.rst
@@ -0,0 +1 @@
+Directories created by `tmpdir` are now considered stale after 3 days without modification (previous value was 3 hours) to avoid deleting directories still in use in long running test suites.
diff --git a/src/_pytest/pathlib.py b/src/_pytest/pathlib.py
index 0bc5bff2b..f0bdb1481 100644
--- a/src/_pytest/pathlib.py
+++ b/src/_pytest/pathlib.py
@@ -32,7 +32,7 @@ from _pytest.compat import assert_never
from _pytest.outcomes import skip
from _pytest.warning_types import PytestWarning
-LOCK_TIMEOUT = 60 * 60 * 3
+LOCK_TIMEOUT = 60 * 60 * 24 * 3
_AnyPurePath = TypeVar("_AnyPurePath", bound=PurePath)