Skip to content

Commit f88bde1

Browse files
committed
add test for os.altsep
1 parent bae9064 commit f88bde1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

os/os.test.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,16 @@ def _fail(test_name):
208208
_fail("os.devnull corresponding with os.name")
209209
failed+=1
210210

211+
if os.altsep == None and os.name == "posix":
212+
_pass('os.altsep == None and os.name == "posix"')
213+
passed_tests+=1
214+
elif os.altsep == "/" and os.name == "nt":
215+
_pass('os.altsep == "/" and os.name == "nt"')
216+
passed_tests+=1
217+
else:
218+
_fail("os.altsep corresponding with os.name")
219+
failed+=1
220+
211221
print()
212222
print(bcolors.ENDC+bcolors.BOLD+bcolors.HEADER+"Please check if $HOME will be outputted...")
213223
print(bcolors.ENDC)

0 commit comments

Comments
 (0)