Opened 3 years ago

Closed 17 months ago

#24657 closed defect (duplicate)

cvxopt testsuite fails with matplotlib-2.1.0

Reported by: vbraun Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: standard Keywords:
Cc: Merged in:
Authors: Reviewers: François Bissey
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

The cvxopt testsuite should work headless and not try to connect to X:

[cvxopt-1.1.8.p2] Optimal solution found.
[cvxopt-1.1.8.p2] Traceback (most recent call last):
[cvxopt-1.1.8.p2]   File "normappr.py", line 26, in <module>
[cvxopt-1.1.8.p2]     pylab.subplot(311)
[cvxopt-1.1.8.p2]   File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 1052, in subplot
[cvxopt-1.1.8.p2]     fig = gcf()
[cvxopt-1.1.8.p2]   File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 588, in gcf
[cvxopt-1.1.8.p2]     return figure()
[cvxopt-1.1.8.p2]   File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/matplotlib/pyplot.py", line 534, in figure
[cvxopt-1.1.8.p2]     **kwargs)
[cvxopt-1.1.8.p2]   File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 170, in new_figure_manager
[cvxopt-1.1.8.p2]     return cls.new_figure_manager_given_figure(num, fig)
[cvxopt-1.1.8.p2]   File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 1049, in new_figure_manager_given_figure
[cvxopt-1.1.8.p2]     window = Tk.Tk(className="matplotlib")
[cvxopt-1.1.8.p2]   File "/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/lib-tk/Tkinter.py", line 1819, in __init__
[cvxopt-1.1.8.p2]     self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
[cvxopt-1.1.8.p2] _tkinter.TclError: no display name and no $DISPLAY environment variable
[cvxopt-1.1.8.p2] Error: test /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/var/tmp/sage/build/cvxopt-1.1.8.p2/src/examples/doc/chap10/normappr.py failed

Change History (7)

comment:1 Changed 3 years ago by embray

  • Milestone sage-8.2 deleted

comment:2 follow-up: Changed 2 years ago by Konrad127123

Still broken in 8.5.beta2, but #26288 seems to fix this.

comment:3 in reply to: ↑ 2 Changed 2 years ago by Konrad127123

Replying to Konrad127123:

Still broken in 8.5.beta2, but #26288 seems to fix this.

Correction: #26288 (upgrading mathplotlib to 2.2.3) doesn't fix it.

#22380 (upgrading cvxopt to 1.2.2) doesn't fix it either and nor does combining both #26288 and #22380.

comment:4 Changed 2 years ago by Konrad127123

On Debian unstable this bug is only triggered if the system tk8.6-dev package is installed.

comment:5 Changed 2 years ago by fbissey

The spkg goes out of its way to run the examples rather than cvxopt own test suite.

for di in "$CUR"/src/examples/doc/chap* ; do
    echo "Testing in $di"
    cd "$di"
    for i in `ls | grep -v bin` ; do
        echo "Testing $i ..."
        sage-python23 $i
        if [ $? -ne 0 ]; then
            echo >&2 "Error: test $di/$i failed"
            exit 1
        fi
    done
done

But looking at upstream .travis.yml this is what you sould use to run cvxopt's testsuite

script:
  - python -c 'from cvxopt import blas,lapack,glpk,fftw,dsdp,gsl,cholmod,umfpack'
  - py.test --cov=cvxopt tests/

Of course that implies that pytest and some of its components be installed which is not the case of the default sage. But the failure is clearly self inflicted, running as tests something that wasn't meant to be one. Is it also the case in debian?

In this light, what should we do about cvxopt's spkg-check file?

comment:6 Changed 17 months ago by jhpalmieri

  • Milestone set to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

Let's close this as a duplicate of #28730.

comment:7 Changed 17 months ago by fbissey

  • Resolution set to duplicate
  • Reviewers set to François Bissey
  • Status changed from needs_review to closed
Note: See TracTickets for help on using tickets.