summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-02-27 12:42:52 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-02-27 12:42:52 (GMT)
commit0263da547e0053865fe5ad868057a89a1de2fd2e (patch)
tree11146dba0c06640aae2921465b2f3134636d6463
parent82aa01fa2995a1a8f164c0747061d32ad5903858 (diff)
downloadcpython-0263da547e0053865fe5ad868057a89a1de2fd2e.zip
cpython-0263da547e0053865fe5ad868057a89a1de2fd2e.tar.gz
cpython-0263da547e0053865fe5ad868057a89a1de2fd2e.tar.bz2
Add a test for normpath to test_macpath.
-rw-r--r--Lib/test/test_macpath.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_macpath.py b/Lib/test/test_macpath.py
index f477ddb..564def7 100644
--- a/Lib/test/test_macpath.py
+++ b/Lib/test/test_macpath.py
@@ -61,6 +61,12 @@ class MacPathTestCase(unittest.TestCase):
self.assertEqual(splitext(""), ('', ''))
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():
test_support.run_unittest(MacPathTestCase)