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 22, 2021
1 parent 9d469f1 commit d614c01
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`"):
print(sys.inputs)

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

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

0 comments on commit d614c01

Please sign in to comment.