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

Method test_splitext

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

Source from the content-addressed store, hash-verified

96
97class TestNtpath(NtpathTestCase):
98 def test_splitext(self):
99 tester('ntpath.splitext("foo.ext")', ('foo', '.ext'))
100 tester('ntpath.splitext("/foo/foo.ext")', ('/foo/foo', '.ext'))
101 tester('ntpath.splitext(".ext")', ('.ext', ''))
102 tester('ntpath.splitext("\\foo.ext\\foo")', ('\\foo.ext\\foo', ''))
103 tester('ntpath.splitext("foo.ext\\")', ('foo.ext\\', ''))
104 tester('ntpath.splitext("")', ('', ''))
105 tester('ntpath.splitext("foo.bar.ext")', ('foo.bar', '.ext'))
106 tester('ntpath.splitext("xx/foo.bar.ext")', ('xx/foo.bar', '.ext'))
107 tester('ntpath.splitext("xx\\foo.bar.ext")', ('xx\\foo.bar', '.ext'))
108 tester('ntpath.splitext("c:a/b\\c.d")', ('c:a/b\\c', '.d'))
109
110 def test_splitdrive(self):
111 tester("ntpath.splitdrive('')", ('', ''))

Callers

nothing calls this directly

Calls 1

testerFunction · 0.85

Tested by

no test coverage detected