44import pytest
55import scipy .linalg
66
7+ from control .tests .conftest import slycotonly
8+
79from control import ss , tf , tf2ss
810from control .canonical import canonical_form , reachable_form , \
911 observable_form , modal_form , similarity_transform , bdschur
@@ -242,6 +244,7 @@ def block_diag_from_eig(eigvals):
242244 return scipy .linalg .block_diag (* blocks )
243245
244246
247+ @slycotonly
245248@pytest .mark .parametrize (
246249 "eigvals, condmax, blksizes" ,
247250 [
@@ -266,6 +269,7 @@ def test_bdschur_ref(eigvals, condmax, blksizes):
266269 np .testing .assert_array_almost_equal (solve (t , a ).dot (t ), b )
267270
268271
272+ @slycotonly
269273@pytest .mark .parametrize (
270274 "eigvals, sorted_blk_eigvals, sort" ,
271275 [
@@ -294,6 +298,7 @@ def test_bdschur_sort(eigvals, sorted_blk_eigvals, sort):
294298 blk_eigval .imag )
295299
296300
301+ @slycotonly
297302def test_bdschur_defective ():
298303 # the eigenvalues of this simple defective matrix cannot be separated
299304 # a previous version of the bdschur would fail on this
@@ -316,16 +321,14 @@ def test_bdschur_condmax_lt_1():
316321 bdschur (1 , condmax = np .nextafter (1 , 0 ))
317322
318323
324+ @slycotonly
319325def test_bdschur_invalid_sort ():
320326 # sort must be in ('continuous', 'discrete')
321327 with pytest .raises (ValueError ):
322328 bdschur (1 , sort = 'no-such-sort' )
323329
324330
325- # temp
326- from control import ss , tf , ControlNotImplemented
327-
328-
331+ @slycotonly
329332@pytest .mark .parametrize (
330333 "A_true, B_true, C_true, D_true" ,
331334 [(np .diag ([4.0 , 3.0 , 2.0 , 1.0 ]), # order from largest to smallest
@@ -386,6 +389,7 @@ def test_modal_form(A_true, B_true, C_true, D_true):
386389 np .dot (np .dot (C , np .linalg .matrix_power (A , i )), B ))
387390
388391
392+ @slycotonly
389393@pytest .mark .parametrize (
390394 "condmax, len_blksizes" ,
391395 [(1.1 , 1 ),
@@ -404,6 +408,7 @@ def test_modal_form_condmax(condmax, len_blksizes):
404408 np .testing .assert_array_almost_equal (zsys .D , xsys .D )
405409
406410
411+ @slycotonly
407412@pytest .mark .parametrize (
408413 "sys_type" ,
409414 ['continuous' ,
0 commit comments