homepage

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 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 <1410269542.6.0.678850898452.issue7559@psf.upfronthosting.co.za>
In-reply-to
Content
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/loader.py", line 140, in loadTestsFromName
 module = __import__(module_name)
 File "/home/rdmurray/python/p35/Lib/test/test_os.py", 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/runpy.py", line 170, in _run_module_as_main
 "__main__", mod_spec)
 File "/home/rdmurray/python/p35/Lib/runpy.py", line 85, in _run_code
 exec(code, run_globals)
 File "/home/rdmurray/python/p35/Lib/unittest/__main__.py", line 18, in <module>
 main(module=None)
 File "/home/rdmurray/python/p35/Lib/unittest/main.py", line 92, in __init__
 self.parseArgs(argv)
 File "/home/rdmurray/python/p35/Lib/unittest/main.py", line 139, in parseArgs
 self.createTests()
 File "/home/rdmurray/python/p35/Lib/unittest/main.py", line 146, in createTests
 self.module)
 File "/home/rdmurray/python/p35/Lib/unittest/loader.py", line 202, in loadTestsFromNames
 suites = [self.loadTestsFromName(name, module) for name in names]
 File "/home/rdmurray/python/p35/Lib/unittest/loader.py", line 202, in <listcomp>
 suites = [self.loadTestsFromName(name, module) for name in names]
 File "/home/rdmurray/python/p35/Lib/unittest/loader.py", 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 :).
History
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: <1410269542.6.0.678850898452.issue7559@psf.upfronthosting.co.za>
2014年09月09日 13:32:22r.david.murraylinkissue7559 messages
2014年09月09日 13:32:21r.david.murraycreate

AltStyle によって変換されたページ (->オリジナル) /