Skip to content

Commit

Permalink
src/sage/doctest/reporting.py: Include message in '[failed in baselin…
Browse files Browse the repository at this point in the history
…e]' if provided
  • Loading branch information
mkoeppe committed Jan 22, 2024
1 parent 9db526c commit 5e69712
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sage/doctest/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,13 @@ def report_head(self, source, fail_msg=None):
baseline = self.controller.source_baseline(source)
if fail_msg:
cmd += " # " + fail_msg
if baseline.get('failed', False):
if failed := baseline.get('failed', False):
if not fail_msg:
cmd += " #"
cmd += " [failed in baseline]"
if failed is True:
cmd += " [failed in baseline]"
else:
cmd += f" [failed in baseline: {failed}]"
return cmd

def report(self, source, timeout, return_code, results, output, pid=None):
Expand Down

0 comments on commit 5e69712

Please sign in to comment.