Author r.david.murray
Recipients BreamoreBoy, Julian, alexgarel, brett.cannon, chris.jerdonek, eric.snow, ezio.melotti, iElectric, michael.foord, r.david.murray, rbcollins, slmnhq, vila, zach.ware
Date 2014-09-09.13:32:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thanks for tackling this.  It's been bugging me almost daily this past week, but as usual when this bug is in my face I had no time to actually work on a fix.

I applied this patch to default,  put an invalid import in test_os, and this is the result:

rdmurray@pydev:~/python/p35>./python -m unittest test.test_os
Traceback (most recent call last):
  File "/home/rdmurray/python/p35/Lib/unittest/", line 140, in loadTestsFromName
    module = __import__(module_name)
  File "/home/rdmurray/python/p35/Lib/test/", line 5, in <module>
    import foobar
ImportError: No module named 'foobar'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rdmurray/python/p35/Lib/", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/rdmurray/python/p35/Lib/", line 85, in _run_code
    exec(code, run_globals)
  File "/home/rdmurray/python/p35/Lib/unittest/", line 18, in <module>
  File "/home/rdmurray/python/p35/Lib/unittest/", line 92, in __init__
  File "/home/rdmurray/python/p35/Lib/unittest/", line 139, in parseArgs
  File "/home/rdmurray/python/p35/Lib/unittest/", line 146, in createTests
  File "/home/rdmurray/python/p35/Lib/unittest/", line 202, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/home/rdmurray/python/p35/Lib/unittest/", line 202, in <listcomp>
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/home/rdmurray/python/p35/Lib/unittest/", line 145, in loadTestsFromName
    next_attribute, self.suiteClass)
ValueError: need more than 1 value to unpack

I get similar errors if I misspell the module name in on the command line.

From my point of view this is still an improvement over the status quo, but I don't think it is what you had in mind :).
Date User Action Args
2014-09-09 13:32:22r.david.murraysetrecipients: + r.david.murray, brett.cannon, rbcollins, vila, iElectric, ezio.melotti, michael.foord, slmnhq, chris.jerdonek, BreamoreBoy, Julian, eric.snow, alexgarel, zach.ware
2014-09-09 13:32:22r.david.murraysetmessageid: <>
2014-09-09 13:32:22r.david.murraylinkissue7559 messages
2014-09-09 13:32:21r.david.murraycreate