coverage.py: move print of failed tests to the end

This commit is contained in:
Johannes Schauer Marin Rodrigues 2023-08-20 08:03:48 +02:00
parent 9c970c0326
commit c7559e305e
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -432,11 +432,6 @@ def main():
print(f"skipped because of {reason}:", file=sys.stderr) print(f"skipped because of {reason}:", file=sys.stderr)
for t in l: for t in l:
print(f" {t}", file=sys.stderr) print(f" {t}", file=sys.stderr)
if failed:
print("failed %d:" % len(failed), file=sys.stderr)
for f in failed:
print(f, file=sys.stderr)
exit(1)
if len(time_per_test) > 1: if len(time_per_test) > 1:
print_time_per_test(time_per_test) print_time_per_test(time_per_test)
if len(acc_time_per_test) > 1: if len(acc_time_per_test) > 1:
@ -447,6 +442,11 @@ def main():
}, },
"accumulated test", "accumulated test",
) )
if failed:
print("failed %d:" % len(failed), file=sys.stderr)
for f in failed:
print(f, file=sys.stderr)
exit(1)
if __name__ == "__main__": if __name__ == "__main__":