From b45715ea0cbee5b90f3244cbf851482500939b3c Mon Sep 17 00:00:00 2001 From: Vladimir Date: Wed, 1 Jun 2022 10:58:57 +0300 Subject: [PATCH] fix: Fix for no failures found case --- failure_analysis/failure_analysis.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/failure_analysis/failure_analysis.py b/failure_analysis/failure_analysis.py index 2f3433a..db7028c 100644 --- a/failure_analysis/failure_analysis.py +++ b/failure_analysis/failure_analysis.py @@ -91,6 +91,10 @@ def run(path: str): raise IOError(f"{path} should be directory but it was not.") failure, testname, filename, classname = parse_xml(xml_path) + if len(failure)==0: + print("NO FAILURES FOUND") + exit() + testnames = list(itertools.permutations(testname, 2)) failures = list(itertools.permutations(failure, 2)) filenames = list(itertools.permutations(filename, 2))