Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #25308: sage -t --show-skipped says "5 latex tests not run" whil…
…e they are First I add a problem in the output of a `#optional - latex` doctest: {{{ #!diff diff --git a/src/sage/misc/latex.py b/src/sage/misc/latex.py index 4771a1c..01e9cb4 100644 --- a/src/sage/misc/latex.py +++ b/src/sage/misc/latex.py @@ -1548,7 +1548,7 @@ Warning: `{}` is not part of this computer's TeX installation.""".format(file_na sage: latex.add_package_to_preamble_if_available("xypic") sage: latex.add_package_to_preamble_if_available("nonexistent_package") sage: latex.extra_preamble() # optional - latex - '\\usepackage{xypic}\n' + '\\usepackage{xypic}\n' PROBLEM sage: latex.extra_preamble('') """ assert isinstance(package_name, str) }}} Then this is OK: {{{ $ sage -t --show-skipped src/sage/misc/latex.py Using --optional=ccache,dot2tex,mpir,notedown,pandoc_attributes,python2, rst2ipynb,sage Doctesting 1 file. sage -t src/sage/misc/latex.py 1 imagemagick test not run 5 latex tests not run 3 other tests skipped [310 tests, 1.23 s] ---------------------------------------------------------------------- All tests passed! ---------------------------------------------------------------------- }}} Then, writing `--optional=sage,external` detects that `latex` is available and runs the 5 `latex` optional tests (total number of tests goes from 310 to 315). {{{ $ sage -t --show-skipped --optional=sage,external src/sage/misc/latex.py Using --optional=external,sage External software to be detected: cplex,gurobi,internet,latex,macaulay2, magma,maple,mathematica,matlab,octave,scilab Doctesting 1 file. sage -t src/sage/misc/latex.py ********************************************************************** File "src/sage/misc/latex.py", line 1550, in sage.misc.latex.Latex.add_package_to_preamble_if_available Failed example: latex.extra_preamble() # optional - latex Expected: '\\usepackage{xypic}\n' PROBLEM Got: '\\usepackage{xypic}\n' ********************************************************************** 1 item had failures: 1 of 5 in sage.misc.latex.Latex.add_package_to_preamble_if_available 1 imagemagick test not run 5 latex tests not run 3 other tests skipped [315 tests, 1 failure, 1.55 s] ---------------------------------------------------------------------- sage -t src/sage/misc/latex.py # 1 doctest failed ---------------------------------------------------------------------- Total time for all tests: 1.8 seconds cpu time: 0.6 seconds cumulative wall time: 1.5 seconds External software detected for doctesting: latex }}} But `--show-skipped` still says that `5 latex tests not run`. URL: https://trac.sagemath.org/25308 Reported by: slabbe Ticket author(s): Sébastien Labbé Reviewer(s): Vincent Klein
- Loading branch information