summaryrefslogtreecommitdiff
path: root/Lib/test/test_ntpath.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2017-02-04 15:05:50 -0800
committerSteve Dower <steve.dower@microsoft.com>2017-02-04 15:05:50 -0800
commit3b0e4320092ac0504b6670cafaf0301b908c91fc (patch)
treed3be1b6b844d61763bb366fa21ceed475e5703fd /Lib/test/test_ntpath.py
parentb2fa705fd3887c326e811c418469c784353027f4 (diff)
parentf687fbcd73c14dfcbe086eb5cd94b298f1e81e72 (diff)
downloadcpython-3b0e4320092ac0504b6670cafaf0301b908c91fc.tar.gz
Issue #29392: Prevent crash when passing invalid arguments into msvcrt module.
Diffstat (limited to 'Lib/test/test_ntpath.py')
-rw-r--r--Lib/test/test_ntpath.py25
1 files changed, 1 insertions, 24 deletions
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py
index 90edb6d080..15215e497d 100644
--- a/Lib/test/test_ntpath.py
+++ b/Lib/test/test_ntpath.py
@@ -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):