[Python-checkins] r78696 - python/branches/py3k/Lib/test/test_imp.py
ezio.melotti
python-checkins at python.org
Fri Mar 5 16:08:19 CET 2010
Author: ezio.melotti
Date: Fri Mar 5 16:08:19 2010
New Revision: 78696
Log:
r78689 enabled the test on more platforms but the buildbot did not like it. Using the filesystem encoding might work better. Also see #5604.
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 Fri Mar 5 16:08:19 2010
@@ -1,5 +1,4 @@
import imp
-import locale
import os
import os.path
import sys
@@ -86,7 +85,7 @@
# 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 @@
'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')
More information about the Python-checkins
mailing list