Skip to content

Commit

Permalink
tests: improve error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
bretello committed Apr 17, 2024
1 parent 83e1a91 commit 3e9e949
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions testing/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,12 @@ def check(func, expected, terminal_size=None):
maxlen = max(map(len, expected)) if expected else 0
all_ok = True
print()
print(
pdbpp.Color.set(pdbpp.Color.darkgreen, "Expected".ljust(maxlen + 1)),
"| ",
pdbpp.Color.set(pdbpp.Color.yellow, "Actual"),
)
print("=" * (2 * maxlen + 3))
for pattern, string in zip_longest(expected, lines):
if pattern is not None and string is not None:
if is_prompt(pattern) and is_prompt(string):
Expand Down

0 comments on commit 3e9e949

Please sign in to comment.