]> granicus.if.org Git - python/commitdiff
Merged revisions 79144 via svnmerge from
authorFlorent Xicluna <florent.xicluna@gmail.com>
Sat, 20 Mar 2010 20:38:20 +0000 (20:38 +0000)
committerFlorent Xicluna <florent.xicluna@gmail.com>
Sat, 20 Mar 2010 20:38:20 +0000 (20:38 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r79144 | florent.xicluna | 2010-03-20 21:30:53 +0100 (sam, 20 mar 2010) | 2 lines

  #8133: Use appropriate Unicode decomposition on MacOS X platform.
........

Lib/test/test_imp.py

index c24d465c94e6d85b45b1845df7f16acb63b8ac03..d66d40edd7f75125ca129a9230b3685eee51a026 100644 (file)
@@ -104,7 +104,14 @@ class ImportTests(unittest.TestCase):
             'cp1258' : b'\xc0',
             }
 
-        special_char = known_locales.get(fs_encoding)
+        if sys.platform == 'darwin':
+            self.assertEqual(fs_encoding, 'utf-8')
+            # Mac OS X uses the Normal Form D decomposition
+            # http://developer.apple.com/mac/library/qa/qa2001/qa1173.html
+            special_char = b'a\xcc\x88'
+        else:
+            special_char = known_locales.get(fs_encoding)
+
         if not special_char:
             self.skipTest("can't run this test with %s as filesystem encoding"
                           % fs_encoding)