Skip to content

Commit

Permalink
runner: show failing test name in console
Browse files Browse the repository at this point in the history
  • Loading branch information
tangentstorm committed Feb 14, 2024
1 parent 76493e3 commit 7169b37
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tanco/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def run_tests(cfg: Config):
print()
TancoClient().send_pass(cfg)
except (subprocess.TimeoutExpired, TestFailure) as e:
# TODO: is this even reachable??
print()
print('%d of %d tests passed.' % (num_passed, len(tests)))
if isinstance(e, subprocess.TimeoutExpired):
Expand Down Expand Up @@ -261,8 +262,11 @@ def error(cfg: Config, msg: list[str]):


def fail(cfg: Config, msg: list[str], tn: str | None = None, tr: m.TestResult | None = None):
print("\n")

Check failure on line 265 in tanco/runner.py

View workflow job for this annotation

GitHub Actions / test

Ruff (Q000)

tanco/runner.py:265:11: Q000 Double quotes found but single quotes preferred
if tn == TANCO_CHECK:
print('`tanco check` failed.')
else:
print('Test [%s] failed.' % tn)
for line in msg:
print(line)
if tn and tr and (tn != TANCO_CHECK):
Expand Down

0 comments on commit 7169b37

Please sign in to comment.