From b5f6c7f08fc3a9c1aaf1ca057d28b8ba21d183b7 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Thu, 27 Oct 2022 11:37:39 +0200 Subject: [PATCH] coverage.py: print failed options if more than one choices --- coverage.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/coverage.py b/coverage.py index 96c35b9..779e80a 100755 --- a/coverage.py +++ b/coverage.py @@ -121,13 +121,13 @@ def parse_config(confname): def format_failed(num, total, name, dist, mode, variant, fmt, config_dict): 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}" - if len(config_dict[name].get("Modes", [])) > 0: + if len(config_dict[name].get("Modes", [])) > 1: ret += f" --mode={mode}" - if len(config_dict[name].get("Variants", [])) > 0: + if len(config_dict[name].get("Variants", [])) > 1: ret += f" --variant={variant}" - if len(config_dict[name].get("Formats", [])) > 0: + if len(config_dict[name].get("Formats", [])) > 1: ret += f" --format={fmt}" return ret