#14680: fix broken optional dot2tex doctests
------------------------------------+------------------------
       Reporter:  slabbe            |        Owner:  mvngu
           Type:  defect            |       Status:  new
       Priority:  major             |    Milestone:  sage-6.3
      Component:  doctest coverage  |   Resolution:
       Keywords:                    |    Merged in:
        Authors:                    |    Reviewers:
Report Upstream:  N/A               |  Work issues:
         Branch:                    |       Commit:
   Dependencies:                    |     Stopgaps:
------------------------------------+------------------------

Old description:

> Many optional dot2tex doctests are broken. Such problems were mentionned
> independently in the discussion of the following tickets (see the linked
> comment and following ones) :
>
>  - http://trac.sagemath.org/sage_trac/ticket/14408#comment:15
>  - http://trac.sagemath.org/sage_trac/ticket/14594#comment:30
>  - http://trac.sagemath.org/sage_trac/ticket/13624#comment:43
>
> The complete list of files containing such broken doctests is :
>
>  [TODO]

New description:

 Some optional dot2tex doctests are broken. Running `sage -t
 --optional=dot2tex,graphviz,sage` on the files containing the string
 {{{dot2tex}}}, I get the following errors (with sage-6.3.beta1):

 {{{
 ----------------------------------------------------------------------
 sage -t sage/combinat/posets/posets.py  # 1 doctest failed
 sage -t sage/graphs/graph_latex.py  # 1 doctest failed
 ----------------------------------------------------------------------
 }}}

 More precisely:

 {{{
 sage -t sage/combinat/posets/posets.py
 **********************************************************************
 File "sage/combinat/posets/posets.py", line 1118, in
 sage.combinat.posets.posets.FinitePoset._latex_
 Failed example:
     print P._latex_() #optional - dot2tex graphviz
 Expected:
     \begin{tikzpicture}[>=latex,line join=bevel,]
     %%
     \node (node_1) at (6bp,57bp) [draw,draw=none] {$2$};
       \node (node_0) at (6bp,7bp) [draw,draw=none] {$1$};
       \draw [black,<-] (node_1) ..controls (6bp,31.269bp) and
 (6bp,20.287bp)  .. (node_0);
     %
     \end{tikzpicture}
 Got:
     <BLANKLINE>
     \begin{tikzpicture}[>=latex,line join=bevel,]
     %%
     \node (node_1) at (6.000000bp,57.000000bp) [draw,draw=none] {$2$};
       \node (node_0) at (6.000000bp,7.000000bp) [draw,draw=none] {$1$};
       \draw [black,<-] (node_1) ..controls (6.000000bp,31.269000bp) and
 (6.000000bp,20.287000bp)  .. (node_0);
     %
     \end{tikzpicture}
     <BLANKLINE>
 **********************************************************************
 }}}

 and

 {{{
 sage -t sage/graphs/graph_latex.py
 **********************************************************************
 File "sage/graphs/graph_latex.py", line 1346, in
 sage.graphs.graph_latex.GraphLatex.dot2tex_picture
 Failed example:
     print G.latex_options().dot2tex_picture() # optional - dot2tex
 graphviz
 Expected:
     \begin{tikzpicture}[>=latex,line join=bevel,]
     %%
     \node (3333) at (...bp,...bp) [draw,draw=none] {$3333$};
       \node (88) at (...bp,...bp) [draw,draw=none] {$88$};
       \draw [black,->] (3333) ..controls (...bp,...bp) and (...bp,...bp)
 .. (88);
       \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
       \pgfsetstrokecolor{strokecol}
       \draw (...bp,...bp) node {$\text{\texttt{my{\char`\_}label}}$};
     %
     \end{tikzpicture}
 Got:
     <BLANKLINE>
     \begin{tikzpicture}[>=latex,line join=bevel,]
     %%
     \node (node_1) at (13.000000bp,79.000000bp) [draw,draw=none] {$3333$};
       \node (node_0) at (13.000000bp,7.000000bp) [draw,draw=none] {$88$};
       \draw [black,->] (node_1) ..controls (13.000000bp,61.492000bp) and
 (13.000000bp,39.255000bp)  .. (node_0);
       \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
       \pgfsetstrokecolor{strokecol}
       \draw (40.000000bp,43.000000bp) node
 {$\text{\texttt{my{\char`\_}label}}$};
     %
     \end{tikzpicture}
     <BLANKLINE>
 **********************************************************************
 }}}

 For the record, the list of files containing the string "dot2tex" (so
 probably containging dot2tex optional doctests) is :

 {{{
 sage/categories/crystals.py
 sage/combinat/crystals/crystals.py
 sage/combinat/perfect_matching.py
 sage/combinat/posets/linear_extensions.py
 sage/combinat/posets/posets.py
 sage/combinat/rigged_configurations/kleber_tree.py
 sage/graphs/digraph.py
 sage/graphs/dot2tex_utils.py
 sage/graphs/generic_graph.py
 sage/graphs/graph.py
 sage/graphs/graph_latex.py
 }}}

 It is not the first time that dot2tex doctests are broken:

  - http://trac.sagemath.org/sage_trac/ticket/14408#comment:15
  - http://trac.sagemath.org/sage_trac/ticket/14594#comment:30
  - http://trac.sagemath.org/sage_trac/ticket/13624#comment:43

--

Comment (by slabbe):

 I am updating this ticket description for broken optional dot2tex doctests
 in 6.3.beta1.

--
Ticket URL: <http://trac.sagemath.org/ticket/14680#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to