Skip to content

Commit f633874

Browse files
committed
add unit test for input/output/state deprecation warning
1 parent 9d469f1 commit f633874

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

control/tests/lti_test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,14 @@ def test_squeeze_exceptions(self, fcn):
250250
sys.frequency_response([[0.1, 1], [1, 10]])
251251
sys([[0.1, 1], [1, 10]])
252252
evalfr(sys, [[0.1, 1], [1, 10]])
253+
254+
with pytest.raises(PendingDeprecationWarning, match="LTI `inputs`"):
255+
assert sys.inputs == sys.ninputs
256+
257+
with pytest.raises(PendingDeprecationWarning, match="LTI `outputs`"):
258+
assert sys.outputs == sys.noutputs
259+
260+
if isinstance(sys, ct.StateSpace):
261+
with pytest.raises(
262+
PendingDeprecationWarning, match="StateSpace `states`"):
263+
assert sys.states == sys.nstates

0 commit comments

Comments
 (0)