Skip to content

Commit

Permalink
test deprecated 'k' keyword for rlocus
Browse files Browse the repository at this point in the history
  • Loading branch information
gdmcbain committed May 22, 2024
1 parent 206ca85 commit b58f435
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions control/tests/rlocus_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,11 @@ def test_root_locus_plots(sys, grid, xlim, ylim, interactive):


# Test deprecated keywords
def test_root_locus_legacy():
@pytest.mark.parametrize("keyword", ["kvect", "k"])
def test_root_locus_legacy(keyword):
sys = ct.rss(2, 1, 1)
with pytest.warns(DeprecationWarning, match="'kvect' is deprecated"):
ct.root_locus_plot(sys, kvect=[0, 1, 2])
with pytest.warns(DeprecationWarning, match=f"'{keyword}' is deprecated"):
ct.root_locus_plot(sys, **{keyword: [0, 1, 2]})


# Generate plots used in documentation
Expand Down

0 comments on commit b58f435

Please sign in to comment.