coverage.py: do not allow 'default' in coverage.txt

This commit is contained in:
Johannes Schauer Marin Rodrigues 2022-10-14 07:16:57 +02:00
parent fbc3e5549d
commit d84a65b07f
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -128,28 +128,44 @@ def main():
if dists == "any": if dists == "any":
dists = all_dists dists = all_dists
elif dists == "default": elif dists == "default":
dists = [default_dist] print(
f"Setting Dists to default in Test {name} is redundant",
file=sys.stderr,
)
exit(1)
else: else:
dists = dists.split() dists = dists.split()
modes = test.get("Modes", default_mode) modes = test.get("Modes", default_mode)
if modes == "any": if modes == "any":
modes = all_modes modes = all_modes
elif modes == "default": elif modes == "default":
modes = [default_mode] print(
f"Setting Modes to default in Test {name} is redundant",
file=sys.stderr,
)
exit(1)
else: else:
modes = modes.split() modes = modes.split()
variants = test.get("Variants", default_variant) variants = test.get("Variants", default_variant)
if variants == "any": if variants == "any":
variants = all_variants variants = all_variants
elif variants == "default": elif variants == "default":
variants = [default_variant] print(
f"Setting Variants to default in Test {name} is redundant",
file=sys.stderr,
)
exit(1)
else: else:
variants = variants.split() variants = variants.split()
formats = test.get("Formats", default_format) formats = test.get("Formats", default_format)
if formats == "any": if formats == "any":
formats = all_formats formats = all_formats
elif formats == "default": elif formats == "default":
formats = [default_format] print(
f"Setting Formats to default in Test {name} is redundant",
file=sys.stderr,
)
exit(1)
else: else:
formats = formats.split() formats = formats.split()
for dist in dists: for dist in dists: