Complete fix of GitLab issue #64: Coverage summary looks wrong
authorEric S. Raymond <esr@thyrsus.com>
Thu, 9 Mar 2023 03:55:12 +0000 (22:55 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 9 Mar 2023 03:55:12 +0000 (22:55 -0500)
tests/coverage_dungeon.py

index d484193707a33f79755ada3a274625a34a883eae..80102e3b01c53c5c3fab81d83017329cab66a8a5 100755 (executable)
@@ -158,7 +158,7 @@ def arb_coverage(arb_msgs, text, report):
         if name not in report["messages"]:
             report["messages"][name] = {"covered" : False}
             report["total"] += 1
-        if not report["messages"][name]["covered"] and search(message, text) or name in DANGLING_MESSAGES:
+        if not report["messages"][name]["covered"] and (search(message, text) or name in DANGLING_MESSAGES):
             report["messages"][name]["covered"] = True
             report["covered"] += 1