mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 22:43:31 +02:00
Better error message when importing test module fails
This commit is contained in:
parent
07bccb9761
commit
18d5d9a3a4
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue