diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-03-05 15:08:19 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-03-05 15:08:19 (GMT) |
commit | 76e0d1a6efac2efbb6b9de739d43be827e7ea8ec (patch) | |
tree | 28c6982e23244081dacab6f60115e649fa76bd7a /Lib/test/test_imp.py | |
parent | e0f83e89e198ce0e28c0732ee550a6368b8e1df2 (diff) | |
download | cpython-76e0d1a6efac2efbb6b9de739d43be827e7ea8ec.zip cpython-76e0d1a6efac2efbb6b9de739d43be827e7ea8ec.tar.gz cpython-76e0d1a6efac2efbb6b9de739d43be827e7ea8ec.tar.bz2 |
r78689 enabled the test on more platforms but the buildbot did not like it. Using the filesystem encoding might work better. Also see #5604.
Diffstat (limited to 'Lib/test/test_imp.py')
-rw-r--r-- | Lib/test/test_imp.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 49cb4cd..3110ea9 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -1,5 +1,4 @@ import imp -import locale import os import os.path import sys @@ -86,7 +85,7 @@ class ImportTests(unittest.TestCase): # But sources modified to follow generic way for processing pathes. # the return encoding can be uppercase - locale_encoding = locale.getpreferredencoding().lower() + fs_encoding = sys.getfilesystemencoding().lower() # covers utf-8 and Windows ANSI code pages # one non-space symbol from every page @@ -104,11 +103,11 @@ class ImportTests(unittest.TestCase): 'cp1258' : b'\xc0', } - special_char = known_locales.get(locale_encoding) + special_char = known_locales.get(fs_encoding) if not special_char: - self.skipTest("can't run this test with %s as preferred encoding" - % locale_encoding) - decoded_char = special_char.decode(locale_encoding) + self.skipTest("can't run this test with %s as filesystem encoding" + % fs_encoding) + decoded_char = special_char.decode(fs_encoding) temp_mod_name = 'test_imp_helper_' + decoded_char test_package_name = 'test_imp_helper_package_' + decoded_char init_file_name = os.path.join(test_package_name, '__init__.py') |