MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_splitdrive

Method test_splitdrive

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

Source from the content-addressed store, hash-verified

106 tester('ntpath.splitext("c:a/b\\c.d")', ('c:a/b\\c', '.d'))
107
108 def test_splitdrive(self):
109 tester("ntpath.splitdrive('')", ('', ''))
110 tester("ntpath.splitdrive('foo')", ('', 'foo'))
111 tester("ntpath.splitdrive('foo\\bar')", ('', 'foo\\bar'))
112 tester("ntpath.splitdrive('foo/bar')", ('', 'foo/bar'))
113 tester("ntpath.splitdrive('\\')", ('', '\\'))
114 tester("ntpath.splitdrive('/')", ('', '/'))
115 tester("ntpath.splitdrive('\\foo\\bar')", ('', '\\foo\\bar'))
116 tester("ntpath.splitdrive('/foo/bar')", ('', '/foo/bar'))
117 tester('ntpath.splitdrive("c:foo\\bar")', ('c:', 'foo\\bar'))
118 tester('ntpath.splitdrive("c:foo/bar")', ('c:', '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('\\\\')", ('\\\\', ''))
122 tester("ntpath.splitdrive('//')", ('//', ''))
123 tester('ntpath.splitdrive("\\\\conky\\mountpoint\\foo\\bar")',
124 ('\\\\conky\\mountpoint', '\\foo\\bar'))
125 tester('ntpath.splitdrive("//conky/mountpoint/foo/bar")',
126 ('//conky/mountpoint', '/foo/bar'))
127 tester('ntpath.splitdrive("\\\\?\\UNC\\server\\share\\dir")',
128 ("\\\\?\\UNC\\server\\share", "\\dir"))
129 tester('ntpath.splitdrive("//?/UNC/server/share/dir")',
130 ("//?/UNC/server/share", "/dir"))
131
132 def test_splitdrive_invalid_paths(self):
133 splitdrive = ntpath.splitdrive

Callers

nothing calls this directly

Calls 1

testerFunction · 0.85

Tested by

no test coverage detected