diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-20 20:30:53 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-20 20:30:53 (GMT) |
commit | 21164ce8f1f1c45fa1305fee4851b19405c19a67 (patch) | |
tree | 086350f81602c2500ea42608e9b29e266904d001 /Lib/test/test_imp.py | |
parent | abd91d5f2c841b75eb8a32b92acee2ae823a4ac6 (diff) | |
download | cpython-21164ce8f1f1c45fa1305fee4851b19405c19a67.zip cpython-21164ce8f1f1c45fa1305fee4851b19405c19a67.tar.gz cpython-21164ce8f1f1c45fa1305fee4851b19405c19a67.tar.bz2 |
#8133: Use appropriate Unicode decomposition on MacOS X platform.
Diffstat (limited to 'Lib/test/test_imp.py')
-rw-r--r-- | Lib/test/test_imp.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 79b3e0f..b7b986b 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -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) |