mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
#5827: make sure that normpath preserves unicode
This commit is contained in:
parent
58a96efde5
commit
b5689de044
5 changed files with 25 additions and 8 deletions
|
@ -381,6 +381,11 @@ class PosixPathTest(unittest.TestCase):
|
|||
self.assertEqual(posixpath.normpath("///foo/.//bar//.//..//.//baz"), "/foo/baz")
|
||||
self.assertEqual(posixpath.normpath("///..//./foo/.//bar"), "/foo/bar")
|
||||
|
||||
# Issue 5827: Make sure normpath preserves unicode
|
||||
for path in (u'', u'.', u'/', u'\\', u'///foo/.//bar//'):
|
||||
self.assertTrue(isinstance(posixpath.normpath(path), unicode),
|
||||
'normpath() returned str instead of unicode')
|
||||
|
||||
self.assertRaises(TypeError, posixpath.normpath)
|
||||
|
||||
def test_abspath(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue