Issue 8182: test_imp.py test failures on Py3K Mac OS X
$ ./python.exe Lib/test/test_imp.py test_find_module_encoding (__main__.ImportTests) ... ok test_issue1267 (__main__.ImportTests) ... ok test_issue3594 (__main__.ImportTests) ... ok test_issue5604 (__main__.ImportTests) ... ERROR test_builtin (__main__.ReloadTests) ... ok test_extension (__main__.ReloadTests) ... ok test_source (__main__.ReloadTests) ... ok testLock (__main__.LockTests) ... ok ====================================================================== ERROR: test_issue5604 (__main__.ImportTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_imp.py", line 121, in test_issue5604 file, filename, info = imp.find_module(temp_mod_name) ImportError: No module named test_imp_helper_ä ---------------------------------------------------------------------- Ran 8 tests in 0.032s FAILED (errors=1) Traceback (most recent call last): File "Lib/test/test_imp.py", line 194, in <module> test_main() File "Lib/test/test_imp.py", line 191, in test_main support.run_unittest(*tests) File "/compile/python3-back/Lib/test/support.py", line 997, in run_unittest _run_suite(suite) File "/compile/python3-back/Lib/test/support.py", line 980, in _run_suite raise TestFailed(err) test.support.TestFailed: Traceback (most recent call last): File "Lib/test/test_imp.py", line 121, in test_issue5604 file, filename, info = imp.find_module(temp_mod_name) ImportError: No module named test_imp_helper_ä Could be related to issue 8180 perhaps? In addition, if I run this test in an ascii terminal, unittest dies trying to output the failure message: File "/compile/python3-back/Lib/unittest/runner.py", line 150, in run result.printErrors() File "/compile/python3-back/Lib/unittest/runner.py", line 105, in printErrors self.printErrorList('ERROR', self.errors) File "/compile/python3-back/Lib/unittest/runner.py", line 113, in printErrorList self.stream.writeln("%s" % err) File "/compile/python3-back/Lib/unittest/runner.py", line 21, in writeln self.write(arg) UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position 197: ordinal not in range(128) Should unittest be fixed to be able to handle this? (Output '\u...' style strings when there is an encoding error in the TextTestRunner / TextTestResult.)