Skip to content

Commit f500cbe

Browse files
committed
parametrize test per @bnavigator suggestion
1 parent d532dc9 commit f500cbe

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

control/tests/pzmap_test.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,11 @@ def test_polezerodata():
9595
np.testing.assert_equal(zeros, sys.zeros())
9696

9797
# Legacy return format
98-
with pytest.warns(DeprecationWarning, match=".* values .* deprecated"):
99-
poles, zeros = ct.pole_zero_plot(pzdata, plot=False)
100-
np.testing.assert_equal(poles, sys.poles())
101-
np.testing.assert_equal(zeros, sys.zeros())
102-
103-
with pytest.warns(DeprecationWarning, match=".* values .* deprecated"):
104-
poles, zeros = ct.pole_zero_plot(pzdata, plot=True)
105-
np.testing.assert_equal(poles, sys.poles())
106-
np.testing.assert_equal(zeros, sys.zeros())
98+
for plot in [True, False]:
99+
with pytest.warns(DeprecationWarning, match=".* values .* deprecated"):
100+
poles, zeros = ct.pole_zero_plot(pzdata, plot=False)
101+
np.testing.assert_equal(poles, sys.poles())
102+
np.testing.assert_equal(zeros, sys.zeros())
107103

108104

109105
def test_pzmap_raises():

0 commit comments

Comments
 (0)