Skip to content

Add run of tests without Slycot on Travis CI #133

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

Merged
merged 2 commits into from
Feb 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ before_install:
- conda install conda-build
- conda config --add channels python-control
- conda info -a
- conda create -q -n test-environment python="$TRAVIS_PYTHON_VERSION" pip coverage slycot
- conda create -q -n test-environment python="$TRAVIS_PYTHON_VERSION" pip coverage
- source activate test-environment
# coveralls not in conda repos
- pip install coveralls
Expand All @@ -45,6 +45,11 @@ install:

# command to run tests
script:
# Before installing Slycot
- python setup.py test

# Now, get and use Slycot
- conda install slycot
- coverage run setup.py test

after_success:
Expand Down
1 change: 1 addition & 0 deletions control/tests/modelsimp_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def testBalredTruncate(self):
np.testing.assert_array_almost_equal(rsys.C, Crtrue,decimal=4)
np.testing.assert_array_almost_equal(rsys.D, Drtrue,decimal=4)

@unittest.skipIf(not slycot_check(), "slycot not installed")
def testBalredMatchDC(self):
#controlable canonical realization computed in matlab for the transfer function:
# num = [1 11 45 32], den = [1 15 60 200 60]
Expand Down
2 changes: 2 additions & 0 deletions control/tests/statefbk_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def testGramWc(self):
Wc = gram(sys,'c')
np.testing.assert_array_almost_equal(Wc, Wctrue)

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

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