Why --optional=sage,optional,external does not test internet,graphviz,latex,gurobi ?

asked 2018-05-06 10:17:34 +0200

Sébastien gravatar image

When running tests with --optional=sage,optional,external

$ sage -t --show-skipped --optional=sage,optional,external src/sage/graphs/graph_latex.py src/sage/databases/oeis.py src/sage/numerical/mip.pyx src/sage/misc/latex.py

the tests with labels latex,gurobi, graphviz, internet are skipped even if latex,gurobi, graphviz, internet are installed on my machine:

Running doctests with ID 2018-05-06-10-12-34-1494f13d.
Using --optional=ccache,dot2tex,external,mpir,notedown,pandoc_attributes,python2,rst2ipynb,sage
External software to be detected: cplex,gurobi,internet,latex,macaulay2,magma,maple,mathematica,matlab,octave,scilab
Doctesting 4 files.
sage -t src/sage/graphs/graph_latex.py
    4 graphviz tests not run
    [187 tests, 1.08 s]
sage -t src/sage/databases/oeis.py
    150 internet tests not run
    5 webbrowser tests not run
    [118 tests, 2.28 s]
sage -t src/sage/numerical/mip.pyx
    8 cplex tests not run
    3 gurobi tests not run
    7 other tests skipped
    [616 tests, 3.69 s]
sage -t src/sage/misc/latex.py
    1 imagemagick test not run
    5 latex tests not run
    3 other tests skipped
    [315 tests, 3.00 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 11.1 seconds
    cpu time: 7.5 seconds
    cumulative wall time: 10.1 seconds
External software detected for doctesting: gurobi,latex
edit retag flag offensive close merge delete

Comments

Detecting internetcapabilities is broken: see https://trac.sagemath.org/ticket/25222. To test latex, for example, use these commands: from sage.doctest.external import has_latex and then has_latex(). It should return True.

John Palmieri gravatar imageJohn Palmieri ( 2018-05-06 21:53:59 +0200 )edit

Also, maybe doctesting is broken: even if software is detected (like latex in your case), maybe it's not used in testing.

John Palmieri gravatar imageJohn Palmieri ( 2018-05-06 21:59:53 +0200 )edit

has_internet is broken indeed but the other two are not:

sage: from sage.doctest.external import has_internet, has_gurobi, has_latex
sage: has_internet()
False
sage: has_gurobi()
True
sage: has_latex()
True

So there seems to be also a problem in doctesting.

Sébastien gravatar imageSébastien ( 2018-05-08 09:55:06 +0200 )edit

adding has_graphviznow needs review at https://trac.sagemath.org/ticket/25305

Sébastien gravatar imageSébastien ( 2018-05-08 10:48:20 +0200 )edit

And I just figured out that "5 latex tests not run" does not mean they are not run!! https://trac.sagemath.org/ticket/25308 needs review

Sébastien gravatar imageSébastien ( 2018-05-08 11:13:44 +0200 )edit