flip around basetemp folder reset to see if it helps on windows

This commit is contained in:
Ronny Pfannschmidt 2019-01-29 18:58:00 +01:00
parent 5567c772cd
commit 2d7582bd92
1 changed files with 2 additions and 1 deletions

View File

@ -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()