MCPcopy Index your code
hub / github.com/python/cpython / test_splitdrive

Method test_splitdrive

Lib/test/test_ntpath.py:110–132  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

108 tester('ntpath.splitext("c:a/b\\c.d")', ('c:a/b\\c', '.d'))
109
110 def test_splitdrive(self):
111 tester("ntpath.splitdrive('')", ('', ''))
112 tester("ntpath.splitdrive('foo')", ('', 'foo'))
113 tester("ntpath.splitdrive('foo\\bar')", ('', 'foo\\bar'))
114 tester("ntpath.splitdrive('foo/bar')", ('', 'foo/bar'))
115 tester("ntpath.splitdrive('\\')", ('', '\\'))
116 tester("ntpath.splitdrive('/')", ('', '/'))
117 tester("ntpath.splitdrive('\\foo\\bar')", ('', '\\foo\\bar'))
118 tester("ntpath.splitdrive('/foo/bar')", ('', '/foo/bar'))
119 tester('ntpath.splitdrive("c:foo\\bar")', ('c:', 'foo\\bar'))
120 tester('ntpath.splitdrive("c:foo/bar")', ('c:', 'foo/bar'))
121 tester('ntpath.splitdrive("c:\\foo\\bar")', ('c:', '\\foo\\bar'))
122 tester('ntpath.splitdrive("c:/foo/bar")', ('c:', '/foo/bar'))
123 tester("ntpath.splitdrive('\\\\')", ('\\\\', ''))
124 tester("ntpath.splitdrive('//')", ('//', ''))
125 tester('ntpath.splitdrive("\\\\conky\\mountpoint\\foo\\bar")',
126 ('\\\\conky\\mountpoint', '\\foo\\bar'))
127 tester('ntpath.splitdrive("//conky/mountpoint/foo/bar")',
128 ('//conky/mountpoint', '/foo/bar'))
129 tester('ntpath.splitdrive("\\\\?\\UNC\\server\\share\\dir")',
130 ("\\\\?\\UNC\\server\\share", "\\dir"))
131 tester('ntpath.splitdrive("//?/UNC/server/share/dir")',
132 ("//?/UNC/server/share", "/dir"))
133
134 def test_splitdrive_invalid_paths(self):
135 splitdrive = ntpath.splitdrive

Callers

nothing calls this directly

Calls 1

testerFunction · 0.85

Tested by

no test coverage detected