Skip to content

Commit 2d1650d

Browse files
committed
import nose to avoid Python 2.7/matplotlib.testing error
1 parent 518c061 commit 2d1650d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ before_install:
7575
# Make sure to look in the right place for python libraries (for slycot)
7676
- export LIBRARY_PATH="$HOME/miniconda/envs/test-environment/lib"
7777
- conda install pytest
78+
# matplotlib.testing.image_compare requires nose in Python 2.7
79+
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
80+
conda install nose;
81+
fi
7882
# coveralls not in conda repos => install via pip instead
7983
- pip install coveralls
8084

control/tests/freqresp_test.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from control.statesp import StateSpace
1717
from control.xferfcn import TransferFunction
1818
from control.matlab import ss, tf, bode, rss
19-
from control.tests.conftest import slycotonly
19+
from control.tests.conftest import slycotonly, nopython2
2020

2121
from matplotlib.testing.decorators import image_comparison
2222

@@ -365,6 +365,7 @@ def pvtol_inner():
365365
return (Pi, Ci)
366366

367367
# Regression test for Gang of 4 plots
368+
@nopython2
368369
@image_comparison(baseline_images=['gangof4-pvtol'], extensions=['png'])
369370
def test_gangof4_pvtol(pvtol_inner):
370371
plt.figure(num=None, figsize=(8, 6), dpi=80)

0 commit comments

Comments
 (0)