Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 630a9a6

Browse files
committed
Fix the tests now that splitdrive() no longer treats UNC paths special.
(Some tests converted to splitunc() tests.)
1 parent f3c695c commit 630a9a6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/test/test_ntpath.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ def tester(fn, wantResult):
1616
errors = errors + 1
1717

1818
tester('ntpath.splitdrive("c:\\foo\\bar")', ('c:', '\\foo\\bar'))
19-
tester('ntpath.splitdrive("\\\\conky\\mountpoint\\foo\\bar")', ('\\\\conky\\mountpoint', '\\foo\\bar'))
19+
tester('ntpath.splitunc("\\\\conky\\mountpoint\\foo\\bar")', ('\\\\conky\\mountpoint', '\\foo\\bar'))
2020
tester('ntpath.splitdrive("c:/foo/bar")', ('c:', '/foo/bar'))
21-
tester('ntpath.splitdrive("//conky/mountpoint/foo/bar")', ('//conky/mountpoint', '/foo/bar'))
21+
tester('ntpath.splitunc("//conky/mountpoint/foo/bar")', ('//conky/mountpoint', '/foo/bar'))
2222

2323
tester('ntpath.split("c:\\foo\\bar")', ('c:\\foo', 'bar'))
2424
tester('ntpath.split("\\\\conky\\mountpoint\\foo\\bar")', ('\\\\conky\\mountpoint\\foo', 'bar'))
2525

2626
tester('ntpath.split("c:\\")', ('c:\\', ''))
27-
tester('ntpath.split("\\\\conky\\mountpoint\\")', ('\\\\conky\\mountpoint\\', ''))
27+
tester('ntpath.split("\\\\conky\\mountpoint\\")', ('\\\\conky\\mountpoint', ''))
2828

2929
tester('ntpath.split("c:/")', ('c:/', ''))
30-
tester('ntpath.split("//conky/mountpoint/")', ('//conky/mountpoint/', ''))
30+
tester('ntpath.split("//conky/mountpoint/")', ('//conky/mountpoint', ''))
3131

3232
tester('ntpath.isabs("c:\\")', 1)
3333
tester('ntpath.isabs("\\\\conky\\mountpoint\\")', 1)

0 commit comments

Comments
 (0)