mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Add a test for normpath to test_macpath.
This commit is contained in:
parent
82aa01fa29
commit
0263da547e
1 changed files with 6 additions and 0 deletions
|
@ -61,6 +61,12 @@ class MacPathTestCase(unittest.TestCase):
|
||||||
self.assertEqual(splitext(""), ('', ''))
|
self.assertEqual(splitext(""), ('', ''))
|
||||||
self.assertEqual(splitext("foo.bar.ext"), ('foo.bar', '.ext'))
|
self.assertEqual(splitext("foo.bar.ext"), ('foo.bar', '.ext'))
|
||||||
|
|
||||||
|
def test_normpath(self):
|
||||||
|
# Issue 5827: Make sure normpath preserves unicode
|
||||||
|
for path in (u'', u'.', u'/', u'\\', u':', u'///foo/.//bar//'):
|
||||||
|
self.assertIsInstance(macpath.normpath(path), unicode,
|
||||||
|
'normpath() returned str instead of unicode')
|
||||||
|
|
||||||
|
|
||||||
def test_main():
|
def test_main():
|
||||||
test_support.run_unittest(MacPathTestCase)
|
test_support.run_unittest(MacPathTestCase)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue