Commit 4336f1fe authored by matt@zope.com's avatar matt@zope.com

Updated testrunner to be more explicit about errors when modules do not import

parent 9adc7636
......@@ -55,7 +55,14 @@ class TestRunner:
saved_syspath = sys.path[:]
try:
sys.path.append(path) # let module find things in its dir
try:
module=imp.load_module(name, file, pathname, desc)
except:
(tb_t, tb_v, tb_tb) = sys.exc_info()
self.report("Module %s failed to load\n%s: %s" % (pathname,
tb_t, tb_v))
self.report(join( traceback.format_tb(tb_tb)) + '\n')
del tb_tb
finally:
file.close()
sys.path.pop() # Remove module level path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment