Message226633
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 :). |
|
Date |
User |
Action |
Args |
2014-09-09 13:32:22 | r.david.murray | set | recipients:
+ 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:22 | r.david.murray | set | messageid: <1410269542.6.0.678850898452.issue7559@psf.upfronthosting.co.za> |
2014-09-09 13:32:22 | r.david.murray | link | issue7559 messages |
2014-09-09 13:32:21 | r.david.murray | create | |
|