From 188a7041cc8702c6035d3ba357b46d823d0f2325 Mon Sep 17 00:00:00 2001 From: Justin Abrahms Date: Fri, 5 Aug 2022 13:38:24 -0700 Subject: [PATCH] Nicer output for spec matcher --- spec_finder.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spec_finder.py b/spec_finder.py index ba565e57..8ef9bfae 100644 --- a/spec_finder.py +++ b/spec_finder.py @@ -86,11 +86,13 @@ def main(refresh_spec=False, diff_output=False, limit_numbers=None): print(number + '\n' + '\n'.join([li for li in difflib.ndiff([txt], [spec_map[number]]) if not li.startswith(' ')])) continue - print(f"Couldn't find the number {number}") - print("\n\n") + print(f"{number} is defined in our tests, but couldn't find it in the spec") + print("") if len(missing) > 0: - print('Missing: ', missing) + print('In the spec, but not in our tests: ') + for m in missing: + print(f" {m}: {spec_map[m]}") sys.exit(bad_num)