This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author michael.foord
Recipients brett.cannon, michael.foord, ronaldoussoren
Date 2010-03-20.16:41:09
SpamBayes Score 2.8971658e-10
Marked as misclassified No
Message-id <1269103272.68.0.0151167142477.issue8182@psf.upfronthosting.co.za>
In-reply-to
Content
$ ./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.)
History
Date User Action Args
2010-03-20 16:41:12michael.foordsetrecipients: + michael.foord, brett.cannon, ronaldoussoren
2010-03-20 16:41:12michael.foordsetmessageid: <1269103272.68.0.0151167142477.issue8182@psf.upfronthosting.co.za>
2010-03-20 16:41:10michael.foordlinkissue8182 messages
2010-03-20 16:41:09michael.foordcreate