mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Better error message when importing test module fails
This commit is contained in:
parent
07bccb9761
commit
18d5d9a3a4
@ -75,6 +75,8 @@ def run_tests(find_tests=find_tests):
|
|||||||
try:
|
try:
|
||||||
for suite in tests:
|
for suite in tests:
|
||||||
for test in suite._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:
|
for s in test:
|
||||||
if s._testMethodName == q:
|
if s._testMethodName == q:
|
||||||
ans = s
|
ans = s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user