Skip to content

Commit a7e0bba

Browse files
committed
TEST: Disable tests that depend on Slycot if absent
testBalredMatchDC, testGramRc, testGramRo which were introduced in PR #118 use functions that depend on Slycot, so the tests should be skipped if it is not found.
1 parent 1757ff0 commit a7e0bba

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

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)