Skip to content

Commit 109301a

Browse files
authored
Merge pull request #148 from gisce/avoid_freeze_on_suite_load_error
BugFix: Dont freeze program on suite load error
2 parents bebea09 + 290dffa commit 109301a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

destral/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ def destral(modules, tests, all_tests=None, enable_coverage=None,
141141
logger.info('Unit testing module %s', module)
142142
os.environ['DESTRAL_MODULE'] = module
143143
coverage.start()
144-
suite = get_unittest_suite(module, tests)
144+
try:
145+
suite = get_unittest_suite(module, tests)
146+
except Exception as e:
147+
logger.error('Suite not found: {}'.format(e))
148+
service.shutdown(1)
145149
suite.drop_database = dropdb
146150
suite.config['all_tests'] = all_tests
147151
if all_tests:

0 commit comments

Comments
 (0)