Skip to content

Commit

Permalink
test: a utility print for when reporting tests fail
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Nov 2, 2022
1 parent 89528f3 commit ea24212
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/coveragetest.py
Expand Up @@ -89,6 +89,7 @@ def get_report(self, cov, squeeze=True, **kwargs):
kwargs.setdefault("show_missing", False)
cov.report(file=repout, **kwargs)
report = repout.getvalue().replace('\\', '/')
print(report) # When tests fail, it's helpful to see the output
if squeeze:
report = re.sub(r" +", " ", report)
return report
Expand Down

0 comments on commit ea24212

Please sign in to comment.