mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Add os.sep
This commit is contained in:
1 parent
615a121200
commit
a75e7635d5
2 files changed
+10
No files matched your search
@@ -1,5 +1,10 @@
|
||||
from _os import *
|
||||
|
||||
if name == 'nt':
|
||||
sep = '\\'
|
||||
else:
|
||||
sep = '/'
|
||||
|
||||
# Change environ to automatically call putenv(), unsetenv if they exist.
|
||||
from _collections_abc import MutableMapping
|
||||
|
||||
|
||||
@@ -58,3 +58,8 @@ if os.name == "posix":
|
||||
os.putenv(ENV_KEY, ENV_VALUE)
|
||||
os.unsetenv(ENV_KEY)
|
||||
assert os.getenv(ENV_KEY) == None
|
||||
|
||||
if os.name == "nt":
|
||||
assert os.sep == "\\"
|
||||
else:
|
||||
assert os.sep == "/"
|
||||
Reference in new issue
Block a user