mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Merge pull request #840 from RustPython/coolreader18/fix-unsetenv-test
Fix os.unsetenv test for windows
This commit is contained in:
1 file changed
+5
-1
@@ -51,6 +51,10 @@ os.environ[ENV_KEY] = ENV_VALUE
|
||||
assert ENV_KEY in os.environ
|
||||
assert os.getenv(ENV_KEY) == ENV_VALUE
|
||||
del os.environ[ENV_KEY]
|
||||
os.unsetenv(ENV_KEY)
|
||||
assert ENV_KEY not in os.environ
|
||||
assert os.getenv(ENV_KEY) == None
|
||||
|
||||
if os.name == "posix":
|
||||
os.putenv(ENV_KEY, ENV_VALUE)
|
||||
os.unsetenv(ENV_KEY)
|
||||
assert os.getenv(ENV_KEY) == None
|
||||
Reference in new issue
Block a user