Opened 10 months ago
Last modified 3 months 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.4 |
Component: | doctest framework | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
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 (4)
comment:1 Changed 10 months ago by
comment:2 Changed 10 months ago by
- 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 7 months ago by
- Milestone changed from sage-9.2 to sage-9.3
comment:4 Changed 3 months ago by
- Milestone changed from sage-9.3 to sage-9.4
Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
sage -t
is perfectly normal and natural for sage-on-distros. In fact./sage
doesn't make any sense there sinceSAGE_ROOT
doesn't exist.If you want to display this, make it dependent on
SAGE_ROOT
not being undefined please.