coverage.py: print failed options if more than one choices

This commit is contained in:
Johannes Schauer Marin Rodrigues 2022-10-27 11:37:39 +02:00
parent 43ba07e790
commit b5f6c7f08f
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -121,13 +121,13 @@ def parse_config(confname):
def format_failed(num, total, name, dist, mode, variant, fmt, config_dict): def format_failed(num, total, name, dist, mode, variant, fmt, config_dict):
ret = f"({num}/{total}) {name}" ret = f"({num}/{total}) {name}"
if len(config_dict[name].get("Dists", [])) > 0: if len(config_dict[name].get("Dists", [])) > 1:
ret += f" --dist={dist}" ret += f" --dist={dist}"
if len(config_dict[name].get("Modes", [])) > 0: if len(config_dict[name].get("Modes", [])) > 1:
ret += f" --mode={mode}" ret += f" --mode={mode}"
if len(config_dict[name].get("Variants", [])) > 0: if len(config_dict[name].get("Variants", [])) > 1:
ret += f" --variant={variant}" ret += f" --variant={variant}"
if len(config_dict[name].get("Formats", [])) > 0: if len(config_dict[name].get("Formats", [])) > 1:
ret += f" --format={fmt}" ret += f" --format={fmt}"
return ret return ret