Unset env variables in tests by del os.environ

The `unsetenv()` operation does not update `os.environ`.
https://docs.python.org/3/library/os.html#os.unsetenv
This commit is contained in:
François Freitag 2020-11-26 21:10:45 +01:00
parent e6e23aa45b
commit 236afac7fd
No known key found for this signature in database
GPG Key ID: 0CD53670BCA9253D

View File

@ -62,4 +62,4 @@ def modify_env(**env):
try:
os.environ[k] = original_env[k]
except KeyError:
os.unsetenv(k)
del os.environ[k]