Skip to content

Commit 6ada795

Browse files
authored
Merge pull request #133 from python-control/testing
Add run of tests without Slycot on Travis CI
2 parents 5ab74cf + a7e0bba commit 6ada795

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ before_install:
3333
- conda install conda-build
3434
- conda config --add channels python-control
3535
- conda info -a
36-
- conda create -q -n test-environment python="$TRAVIS_PYTHON_VERSION" pip coverage slycot
36+
- conda create -q -n test-environment python="$TRAVIS_PYTHON_VERSION" pip coverage
3737
- source activate test-environment
3838
# coveralls not in conda repos
3939
- pip install coveralls
@@ -45,6 +45,11 @@ install:
4545

4646
# command to run tests
4747
script:
48+
# Before installing Slycot
49+
- python setup.py test
50+
51+
# Now, get and use Slycot
52+
- conda install slycot
4853
- coverage run setup.py test
4954

5055
after_success:

control/tests/modelsimp_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ def testBalredTruncate(self):
107107
np.testing.assert_array_almost_equal(rsys.C, Crtrue,decimal=4)
108108
np.testing.assert_array_almost_equal(rsys.D, Drtrue,decimal=4)
109109

110+
@unittest.skipIf(not slycot_check(), "slycot not installed")
110111
def testBalredMatchDC(self):
111112
#controlable canonical realization computed in matlab for the transfer function:
112113
# num = [1 11 45 32], den = [1 15 60 200 60]

control/tests/statefbk_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def testGramWc(self):
7171
Wc = gram(sys,'c')
7272
np.testing.assert_array_almost_equal(Wc, Wctrue)
7373

74+
@unittest.skipIf(not slycot_check(), "slycot not installed")
7475
def testGramRc(self):
7576
A = np.matrix("1. -2.; 3. -4.")
7677
B = np.matrix("5. 6.; 7. 8.")
@@ -103,6 +104,7 @@ def testGramWo2(self):
103104
Wo = gram(sys,'o')
104105
np.testing.assert_array_almost_equal(Wo, Wotrue)
105106

107+
@unittest.skipIf(not slycot_check(), "slycot not installed")
106108
def testGramRo(self):
107109
A = np.matrix("1. -2.; 3. -4.")
108110
B = np.matrix("5. 6.; 7. 8.")

0 commit comments

Comments
 (0)