Opened 4 months ago

Last modified 5 weeks ago

#30268 new enhancement

Use `./sage -t`, not `sage -t` in output of tests ran from `SAGE_ROOT`

Reported by: slelievre Owned by:
Priority: major Milestone: sage-9.3
Component: doctest framework Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by slelievre)

This is to modify output of tests in the case where SAGE_ROOT exists and tests are ran from SAGE_ROOT.

For example when running make test when building Sage in an extracted source tarball or a git clone.

Before this ticket, failures and timeouts show with sage -t:

sage -t --random-seed=0 src/sage/misc/latex.py  # 1 doctest failed
sage -t --random-seed=0 src/sage/plot/animate.py  # Timed out

After this ticket, failures and timeouts show with ./sage -t:

./sage -t --random-seed=0 src/sage/misc/latex.py  # 1 doctest failed
./sage -t --random-seed=0 src/sage/plot/animate.py  # Timed out

This makes the testing process less error-prone.

Indeed, the natural next action is to run each test again by itself, typically by copying and pasting the lines from the above report. A developer might have several versions of Sage installed, and the sage in their PATH might not be the one currently being tested, so one could easy inadvertently retest with the wrong Sage and draw wrong conclusions. Since the paths to tested files in the report are local, the copy-pasted line must be run from the SAGE_ROOT directory, so using ./sage is perfectly sensible.

Change History (3)

comment:1 Changed 4 months ago by fbissey

sage -t is perfectly normal and natural for sage-on-distros. In fact ./sage doesn't make any sense there since SAGE_ROOT doesn't exist.

If you want to display this, make it dependent on SAGE_ROOT not being undefined please.

comment:2 Changed 4 months ago by slelievre

  • Description modified (diff)
  • Summary changed from Use "./sage -t", not "sage -t" in test output to Use `./sage -t`, not `sage -t` in output of tests ran from `SAGE_ROOT`

Good point. I modified the summary and description accordingly.

comment:3 Changed 5 weeks ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3
Note: See TracTickets for help on using tickets.