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

Method test_splitext

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

testerFunction · 0.85

Tested by

no test coverage detected