From 18d5d9a3a4662e7b42f5555356afd01f784bdb91 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 23 Oct 2013 10:27:36 +0530 Subject: [PATCH] Better error message when importing test module fails --- src/calibre/db/tests/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/db/tests/main.py b/src/calibre/db/tests/main.py index 7a41161572..6499f27d08 100644 --- a/src/calibre/db/tests/main.py +++ b/src/calibre/db/tests/main.py @@ -75,6 +75,8 @@ def run_tests(find_tests=find_tests): try: for suite in tests: for test in suite._tests: + if test.__class__.__name__ == 'ModuleImportFailure': + raise Exception('Failed to import a test module: %s' % test) for s in test: if s._testMethodName == q: ans = s