From 80e76f70d58672167b17ddaced6c7856ba703ece Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 31 Dec 2009 12:36:29 -0500 Subject: [PATCH] Better import error messages in test.py --- test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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: -- 2.26.2