Skip to content

Commit

Permalink
add unit test for input/output/state deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
murrayrm committed Jan 23, 2021
1 parent 9d469f1 commit f633874
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions control/tests/lti_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,14 @@ def test_squeeze_exceptions(self, fcn):
sys.frequency_response([[0.1, 1], [1, 10]])
sys([[0.1, 1], [1, 10]])
evalfr(sys, [[0.1, 1], [1, 10]])

with pytest.raises(PendingDeprecationWarning, match="LTI `inputs`"):
assert sys.inputs == sys.ninputs

with pytest.raises(PendingDeprecationWarning, match="LTI `outputs`"):
assert sys.outputs == sys.noutputs

if isinstance(sys, ct.StateSpace):
with pytest.raises(
PendingDeprecationWarning, match="StateSpace `states`"):
assert sys.states == sys.nstates

0 comments on commit f633874

Please sign in to comment.