From 8c1c1ae3107b890e53d8396cfbf79a5a20af09db Mon Sep 17 00:00:00 2001 From: Vasilis Gerakaris Date: Wed, 28 Oct 2020 13:23:35 +0200 Subject: [PATCH] Increase temp dir deletion period to 3 days (#7914) Co-authored-by: Bruno Oliveira --- changelog/7911.bugfix.rst | 1 + src/_pytest/pathlib.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog/7911.bugfix.rst diff --git a/changelog/7911.bugfix.rst b/changelog/7911.bugfix.rst new file mode 100644 index 00000000000..5b85b20b5bc --- /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 355281039fd..dda86d6beba 100644 --- a/src/_pytest/pathlib.py +++ b/src/_pytest/pathlib.py @@ -38,7 +38,7 @@ __all__ = ["Path", "PurePath"] -LOCK_TIMEOUT = 60 * 60 * 3 +LOCK_TIMEOUT = 60 * 60 * 24 * 3 _AnyPurePath = TypeVar("_AnyPurePath", bound=PurePath)