From 2d7582bd9204797ee01eea62a48e3913b4288274 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Tue, 29 Jan 2019 18:58:00 +0100 Subject: [PATCH] flip around basetemp folder reset to see if it helps on windows --- src/_pytest/tmpdir.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_pytest/tmpdir.py b/src/_pytest/tmpdir.py index b8c755ac6..843c8ca37 100644 --- a/src/_pytest/tmpdir.py +++ b/src/_pytest/tmpdir.py @@ -61,8 +61,9 @@ class TempPathFactory(object): """ return base temporary directory. """ if self._basetemp is None: if self._given_basetemp is not None: - basetemp = self._given_basetemp.resolve() + basetemp = self._given_basetemp ensure_reset_dir(basetemp) + basetemp = basetemp.resolve() else: from_env = os.environ.get("PYTEST_DEBUG_TEMPROOT") temproot = Path(from_env or tempfile.gettempdir()).resolve()