|
19 | 19 | from control.dtime import sample_system
|
20 | 20 | from control.lti import evalfr
|
21 | 21 | from control.statesp import (StateSpace, _convert_to_statespace, drss,
|
22 |
| - rss, ss, tf2ss, _statesp_defaults) |
| 22 | + rss, ss, tf2ss, _statesp_defaults, _rss_generate) |
23 | 23 | from control.tests.conftest import ismatarrayout, slycotonly
|
24 | 24 | from control.xferfcn import TransferFunction, ss2tf
|
25 | 25 |
|
@@ -866,6 +866,17 @@ def test_strictly_proper(self, strictly_proper):
|
866 | 866 | break
|
867 | 867 | assert np.all(sys.D == 0.) == strictly_proper
|
868 | 868 |
|
| 869 | + @pytest.mark.parametrize('par, errmatch', |
| 870 | + [((-1, 1, 1, 'c'), 'states must be'), |
| 871 | + ((1, -1, 1, 'c'), 'inputs must be'), |
| 872 | + ((1, 1, -1, 'c'), 'outputs must be'), |
| 873 | + ((1, 1, 1, 'x'), 'cdtype must be'), |
| 874 | + ]) |
| 875 | + def test_rss_invalid(self, par, errmatch): |
| 876 | + """Test invalid inputs for rss() and drss().""" |
| 877 | + with pytest.raises(ValueError, match=errmatch): |
| 878 | + _rss_generate(*par) |
| 879 | + |
869 | 880 |
|
870 | 881 | class TestDrss:
|
871 | 882 | """These are tests for the proper functionality of statesp.drss."""
|
|
0 commit comments