mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #29197: Removed deprecated function ntpath.splitunc().
This commit is contained in:
parent
4f76fb16b7
commit
9ed707eb4c
5 changed files with 9 additions and 61 deletions
|
@ -72,29 +72,6 @@ class TestNtpath(unittest.TestCase):
|
|||
self.assertEqual(ntpath.splitdrive('//conky/MOUNTPOİNT/foo/bar'),
|
||||
('//conky/MOUNTPOİNT', '/foo/bar'))
|
||||
|
||||
def test_splitunc(self):
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
ntpath.splitunc('')
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
tester('ntpath.splitunc("c:\\foo\\bar")',
|
||||
('', 'c:\\foo\\bar'))
|
||||
tester('ntpath.splitunc("c:/foo/bar")',
|
||||
('', 'c:/foo/bar'))
|
||||
tester('ntpath.splitunc("\\\\conky\\mountpoint\\foo\\bar")',
|
||||
('\\\\conky\\mountpoint', '\\foo\\bar'))
|
||||
tester('ntpath.splitunc("//conky/mountpoint/foo/bar")',
|
||||
('//conky/mountpoint', '/foo/bar'))
|
||||
tester('ntpath.splitunc("\\\\\\conky\\mountpoint\\foo\\bar")',
|
||||
('', '\\\\\\conky\\mountpoint\\foo\\bar'))
|
||||
tester('ntpath.splitunc("///conky/mountpoint/foo/bar")',
|
||||
('', '///conky/mountpoint/foo/bar'))
|
||||
tester('ntpath.splitunc("\\\\conky\\\\mountpoint\\foo\\bar")',
|
||||
('', '\\\\conky\\\\mountpoint\\foo\\bar'))
|
||||
tester('ntpath.splitunc("//conky//mountpoint/foo/bar")',
|
||||
('', '//conky//mountpoint/foo/bar'))
|
||||
self.assertEqual(ntpath.splitunc('//conky/MOUNTPOİNT/foo/bar'),
|
||||
('//conky/MOUNTPOİNT', '/foo/bar'))
|
||||
|
||||
def test_split(self):
|
||||
tester('ntpath.split("c:\\foo\\bar")', ('c:\\foo', 'bar'))
|
||||
tester('ntpath.split("\\\\conky\\mountpoint\\foo\\bar")',
|
||||
|
@ -449,7 +426,7 @@ class TestNtpath(unittest.TestCase):
|
|||
|
||||
class NtCommonTest(test_genericpath.CommonTest, unittest.TestCase):
|
||||
pathmodule = ntpath
|
||||
attributes = ['relpath', 'splitunc']
|
||||
attributes = ['relpath']
|
||||
|
||||
|
||||
class PathLikeTests(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue