[pitivi] tests_: validate: Handle testsuite loading failures
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] tests_: validate: Handle testsuite loading failures
- Date: Sun, 30 Jul 2017 00:23:29 +0000 (UTC)
commit 247900a88cc7fcbf76d5d67c99a6b12cf6c0d8e8
Author: Thibault Saunier <tsaunier gnome org>
Date: Sat Jul 15 00:55:21 2017 -0400
tests_: validate: Handle testsuite loading failures
Avoiding backtrace when a testsuite file has synthax issue, and
allowing use to know about the backtrace generated when loading
that testsuite file.
Reviewed-by: Alex Băluț <<alexandru balut gmail com>>
Differential Revision: https://phabricator.freedesktop.org/D1782
tests/ptv_testsuite.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/tests/ptv_testsuite.py b/tests/ptv_testsuite.py
index d53e568..ee3c236 100644
--- a/tests/ptv_testsuite.py
+++ b/tests/ptv_testsuite.py
@@ -49,6 +49,9 @@ def setup_tests(test_manager, options):
testsuites = loader.discover(CDIR)
for testsuite in testsuites:
for _tests in testsuite:
+ if isinstance(_tests, unittest.loader._FailedTest):
+ print(_tests._exception)
+ continue
for test in _tests:
test_manager.add_test(PitiviTest(
sys.executable,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]