[Python-checkins] r79144 - python/branches/py3k/Lib/test/test_imp.py

florent.xicluna python-checkins at python.org
Sat Mar 20 21:30:53 CET 2010


Author: florent.xicluna
Date: Sat Mar 20 21:30:53 2010
New Revision: 79144

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


Modified:
   python/branches/py3k/Lib/test/test_imp.py

Modified: python/branches/py3k/Lib/test/test_imp.py
==============================================================================
--- python/branches/py3k/Lib/test/test_imp.py	(original)
+++ python/branches/py3k/Lib/test/test_imp.py	Sat Mar 20 21:30:53 2010
@@ -104,7 +104,14 @@
             '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)


More information about the Python-checkins mailing list