From adf8f9399d57ea05eba89c6a9f757593a4e77d9a Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Fri, 18 Nov 2022 09:48:26 +0100 Subject: [PATCH] coverage.py: check that all files in ./tests appear in coverage.txt --- coverage.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/coverage.py b/coverage.py index 66eda59..a76fc76 100755 --- a/coverage.py +++ b/coverage.py @@ -207,6 +207,14 @@ def main(): # parse coverage.txt config_order, config_dict = parse_config("coverage.txt") + if set(os.listdir("tests")) - set(config_order): + print( + "test(s) missing from coverage.txt: %s" + % (", ".join(sorted(set(os.listdir("tests")) - set(config_order)))), + file=sys.stderr, + ) + exit(1) + # produce the list of tests using the cartesian product of all allowed # dists, modes, variants and formats of a given test tests = []