aboutsummaryrefslogtreecommitdiff
path: root/are-we-synapse-yet.py
diff options
context:
space:
mode:
authorS7evinK <tfaelligen@gmail.com>2021-12-20 11:26:23 +0100
committerGitHub <noreply@github.com>2021-12-20 10:26:23 +0000
commit640ba425e2a30dca32d99fc511eb3d96c77e4544 (patch)
treeffa726b67b23d309aa1714c126822f83fc4f9828 /are-we-synapse-yet.py
parente5a5be9f545e09ad86eea9d8cb8a56fb302e4852 (diff)
Allow partial test runs (#2076)
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
Diffstat (limited to 'are-we-synapse-yet.py')
-rwxr-xr-xare-we-synapse-yet.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/are-we-synapse-yet.py b/are-we-synapse-yet.py
index 92c7b82b..10b1be28 100755
--- a/are-we-synapse-yet.py
+++ b/are-we-synapse-yet.py
@@ -177,6 +177,10 @@ def print_stats(header_name, gid_to_tests, gid_to_name, verbose):
line = "%s: %s (%d/%d tests)" % (gid_to_name[gid].ljust(25, ' '), pct.rjust(4, ' '), group_passing, group_total)
subsections.append(line)
subsection_test_names[line] = test_names_and_marks
+
+ # avoid errors when trying to divide by 0
+ if total_tests == 0:
+ return
pct = "{0:.0f}%".format(total_passing/total_tests * 100)
print("%s: %s (%d/%d tests)" % (header_name, pct, total_passing, total_tests))