make tmpdir env cleanup idempotent

This commit is contained in:
Ronny Pfannschmidt 2018-10-02 10:20:09 +02:00
parent b82d6f7a0b
commit 94829c391b
1 changed files with 1 additions and 1 deletions

View File

@ -524,7 +524,7 @@ class Testdir(object):
self._sys_modules_snapshot.restore()
self._sys_path_snapshot.restore()
self._cwd_snapshot.restore()
del os.environ["PYTEST_DEBUG_TEMPROOT"]
os.environ.pop("PYTEST_DEBUG_TEMPROOT", None)
def __take_sys_modules_snapshot(self):
# some zope modules used by twisted-related tests keep internal state