Skip to content

Commit 0a40fb6

Browse files
author
Release Manager
committed
sagemathgh-40746: Print full relative path for sage-runtests So one can simply copy and paste the output to rerun the tests URL: sagemath#40746 Reported by: Antonio Rojas Reviewer(s):
2 parents d20eb92 + 350e842 commit 0a40fb6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sage/doctest/reporting.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
# https://www.gnu.org/licenses/
4242
# ****************************************************************************
4343

44+
import os
4445
import re
4546
import sys
4647
from signal import SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, SIGTERM, Signals
@@ -195,7 +196,7 @@ def report_head(self, source, fail_msg=None):
195196
sage: print(DTR.report_head(FDS, "Failed by self-sabotage"))
196197
... --long .../sage/doctest/reporting.py # Failed by self-sabotage
197198
"""
198-
cmd = "sage-runtests" if "sage-runtests" in argv[0] else "python3 -m sage.doctest"
199+
cmd = os.path.relpath(argv[0]) if "sage-runtests" in argv[0] else "python3 -m sage.doctest"
199200
if self.controller.options.long:
200201
cmd += " --long"
201202

0 commit comments

Comments
 (0)