Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py3: dot2tex + graphviz doctests failures #28759

Closed
seblabbe opened this issue Nov 19, 2019 · 7 comments
Closed

py3: dot2tex + graphviz doctests failures #28759

seblabbe opened this issue Nov 19, 2019 · 7 comments

Comments

@seblabbe
Copy link
Contributor

sage -t --optional=sage,optional,external src/sage/combinat/posets/posets.py  src/sage/graphs/graph_latex.py  

gives

too many failed tests, not using stored timings
Running doctests with ID 2019-11-19-09-42-31-d56ff958.
Git branch: develop
Using --optional=4ti2,cbc,ccache,cryptominisat,dot2tex,e_antic,external,
glucose,latte_int,lidia,lrslib,memlimit,normaliz,notedown,openssl,
pandoc_attributes,pycosat,pynormaliz,rst2ipynb,sage,sagenb
External software to be detected: cplex,ffmpeg,graphviz,gurobi,imagemagick,internet,latex,macaulay2,
magma,maple,mathematica,matlab,octave,pandoc,scilab
Doctesting 2 files.
sage -t src/sage/combinat/posets/posets.py
**********************************************************************
File "src/sage/combinat/posets/posets.py", line 1345, 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 (6.0...bp,5...bp) [draw,draw=none] {$2$};
      \node (node_0) at (6.0...bp,...bp) [draw,draw=none] {$1$};
      \draw [black,->] (node_0) ..controls (...bp,...bp) and (...bp,...bp)  .. (node_1);
    %
    \end{tikzpicture}
Got:
    \begin{tikzpicture}[>=latex,line join=bevel,]
    %%
    \node (node_0) at (6.0bp,6.5bp) [draw,draw=none] {$1$};
      \node (node_1) at (6.0bp,55.5bp) [draw,draw=none] {$2$};
      \draw [black,->] (node_0) ..controls (6.0bp,19.603bp) and (6.0bp,30.062bp)  .. (node_1);
    %
    \end{tikzpicture}
**********************************************************************
1 item had failures:
   1 of   3 in sage.combinat.posets.posets.FinitePoset._latex_
    [1354 tests, 1 failure, 8.11 s]
sage -t src/sage/graphs/graph_latex.py
**********************************************************************
File "src/sage/graphs/graph_latex.py", line 1333, 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 (node_3) at (...bp,...bp) [draw,draw=none] {$\left(0, 1\right)$};
      \node (node_2) at (...bp,...bp) [draw,draw=none] {$\left(1, 0\right)$};
      \node (node_1) at (...bp,...bp) [draw,draw=none] {$\left(0, 0\right)$};
      \node (node_0) at (...bp,...bp) [draw,draw=none] {$\left(1, 1\right)$};
      \draw [black,->] (node_1) ..controls (...bp,...bp) and (...bp,...bp)  .. (node_3);
      \draw [black,->] (node_2) ..controls (...bp,...bp) and (...bp,...bp)  .. (node_3);
      \draw [black,->] (node_2) ..controls (...bp,...bp) and (...bp,...bp)  .. (node_0);
      \draw [black,->] (node_1) ..controls (...bp,...bp) and (...bp,...bp)  .. (node_0);
    %
    \end{tikzpicture}
Got:
    \begin{tikzpicture}[>=latex,line join=bevel,]
    %%
    \node (node_0) at (14.5bp,8.5bp) [draw,draw=none] {$\left(0, 1\right)$};
      \node (node_1) at (14.5bp,61.5bp) [draw,draw=none] {$\left(0, 0\right)$};
      \node (node_3) at (61.5bp,8.5bp) [draw,draw=none] {$\left(1, 1\right)$};
      \node (node_2) at (61.5bp,61.5bp) [draw,draw=none] {$\left(1, 0\right)$};
      \draw [black,->] (node_1) ..controls (14.5bp,46.195bp) and (14.5bp,35.966bp)  .. (node_0);
      \draw [black,->] (node_1) ..controls (28.308bp,45.517bp) and (39.027bp,33.886bp)  .. (node_3);
      \draw [black,->] (node_2) ..controls (47.692bp,45.517bp) and (36.973bp,33.886bp)  .. (node_0);
      \draw [black,->] (node_2) ..controls (61.5bp,46.195bp) and (61.5bp,35.966bp)  .. (node_3);
    %
    \end{tikzpicture}
**********************************************************************
File "src/sage/graphs/graph_latex.py", line 1352, 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 (node_1) at (...bp,...bp) [draw,draw=none] {$3333$};
      \node (node_0) at (...bp,...bp) [draw,draw=none] {$88$};
      \draw [black,->] (node_1) ..controls (...bp,...bp) and (...bp,...bp)  .. (node_0);
      \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
      \pgfsetstrokecolor{strokecol}
      \draw (...bp,...bp) node {$\text{\texttt{my{\char`\_}label}}$};
    %
    \end{tikzpicture}
Got:
    \begin{tikzpicture}[>=latex,line join=bevel,]
    %%
    \node (node_0) at (13.5bp,75.5bp) [draw,draw=none] {$3333$};
      \node (node_1) at (13.5bp,6.5bp) [draw,draw=none] {$88$};
      \draw [black,->] (node_0) ..controls (13.5bp,58.8bp) and (13.5bp,37.836bp)  .. (node_1);
      \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
      \pgfsetstrokecolor{strokecol}
      \draw (40.0bp,41.0bp) node {$\text{\texttt{my{\char`\_}label}}$};
    %
    \end{tikzpicture}
**********************************************************************
1 item had failures:
   2 of  12 in sage.graphs.graph_latex.GraphLatex.dot2tex_picture
    [199 tests, 2 failures, 2.22 s]
----------------------------------------------------------------------
sage -t src/sage/combinat/posets/posets.py  # 1 doctest failed
sage -t src/sage/graphs/graph_latex.py  # 2 doctests failed
----------------------------------------------------------------------
Total time for all tests: 10.6 seconds
    cpu time: 8.1 seconds
    cumulative wall time: 10.3 seconds
External software detected for doctesting: graphviz

Component: doctest coverage

Author: Frédéric Chapoton

Branch/Commit: b0e1893

Reviewer: Sébastien Labbé

Issue created by migration from https://trac.sagemath.org/ticket/28759

@seblabbe seblabbe added this to the sage-9.0 milestone Nov 19, 2019
@fchapoton

This comment has been minimized.

@fchapoton
Copy link
Contributor

comment:2

We have random vertex order, so I just made the doctests more blurry.


New commits:

b0e1893trac 28759 py3 fix for dot2tex+graphviz

@fchapoton
Copy link
Contributor

Author: Frédéric Chapoton

@fchapoton
Copy link
Contributor

Branch: u/chapoton/28759

@fchapoton
Copy link
Contributor

Commit: b0e1893

@seblabbe
Copy link
Contributor Author

Reviewer: Sébastien Labbé

@vbraun
Copy link
Member

vbraun commented Nov 29, 2019

Changed branch from u/chapoton/28759 to b0e1893

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants