From: W. Trevor King Date: Thu, 31 Dec 2009 17:36:29 +0000 (-0500) Subject: Better import error messages in test.py X-Git-Tag: 1.0.0~59^2~52^2~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=80e76f70d58672167b17ddaced6c7856ba703ece;p=be.git Better import error messages in test.py --- diff --git a/test.py b/test.py index 29dece6..f26aaa8 100644 --- a/test.py +++ b/test.py @@ -52,7 +52,11 @@ def python_tree(root_path='libbe', root_modname='libbe'): return tree def add_module_tests(suite, modname): - mod = import_by_name(modname) + try: + mod = import_by_name(modname) + except ValueError, e: + print >> sys.stderr, 'Failed to import "%s"' % (modname) + raise e if hasattr(mod, 'suite'): s = mod.suite else: