Minor updates to test runner v2

This commit is contained in:
Mattia Giambirtone 2023-07-05 14:54:24 +02:00
parent c1f765332b
commit 37f35bec08
Signed by: nocturn9x
GPG Key ID: 8270F9F467971E59
1 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,7 @@ def main() -> int:
test_files = list((Path.cwd() / "tests").resolve(strict=True).glob("*.pn"))
print(f"Collected {len(test_files)} tests (before filtering)")
start = default_timer()
for test_file in tqdm(test_files):
for i, test_file in enumerate(tqdm(test_files)):
tests.add(test_file)
if test_file.name in EXCLUDE:
skipped.add(test_file)
@ -36,6 +36,9 @@ def main() -> int:
total = len(tests)
successful = len(tests - failed - skipped)
print(f"Test suite ran in {time_taken:.2f} seconds ({successful}/{total}) passed, {len(failed)}/{total} failed, {len(skipped)}/{total} skipped)")
if failed:
failed_tests = "\n\t- ".join(map(str, failed))
print(f"Failed tests:\n\t- {failed_tests}")
return len(failed) == 0