summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_posixpath.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-01-12 03:32:05 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-01-12 03:32:05 (GMT)
commitb5689de04425775932331b153feee7d9598755ad (patch)
tree15cbe6eeb2e7cbe83379c586ccf696583d617107 /Lib/test/test_posixpath.py
parent58a96efde53a52d501cdf6db810fedb1d86ecdb9 (diff)
downloadcpython-b5689de04425775932331b153feee7d9598755ad.zip
cpython-b5689de04425775932331b153feee7d9598755ad.tar.gz
cpython-b5689de04425775932331b153feee7d9598755ad.tar.bz2
#5827: make sure that normpath preserves unicode
Diffstat (limited to 'Lib/test/test_posixpath.py')
-rw-r--r--Lib/test/test_posixpath.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py
index 3e8ffa9..0c54d83 100644
--- a/Lib/test/test_posixpath.py
+++ b/Lib/test/test_posixpath.py
@@ -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):