Skip to content

Commit b58f435

Browse files
committed
test deprecated 'k' keyword for rlocus
1 parent 206ca85 commit b58f435

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

control/tests/rlocus_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,11 @@ def test_root_locus_plots(sys, grid, xlim, ylim, interactive):
181181

182182

183183
# Test deprecated keywords
184-
def test_root_locus_legacy():
184+
@pytest.mark.parametrize("keyword", ["kvect", "k"])
185+
def test_root_locus_legacy(keyword):
185186
sys = ct.rss(2, 1, 1)
186-
with pytest.warns(DeprecationWarning, match="'kvect' is deprecated"):
187-
ct.root_locus_plot(sys, kvect=[0, 1, 2])
187+
with pytest.warns(DeprecationWarning, match=f"'{keyword}' is deprecated"):
188+
ct.root_locus_plot(sys, **{keyword: [0, 1, 2]})
188189

189190

190191
# Generate plots used in documentation

0 commit comments

Comments
 (0)