Skip to content

Commit 9962cea

Browse files
committed
Fixed sisotool unittest
1 parent c26187f commit 9962cea

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

control/tests/sisotool_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import numpy as np
33
from control.sisotool import sisotool
44
from control.tests.margin_test import assert_array_almost_equal
5-
from control.rlocus import _RLFeedbackClicksSisotool
5+
from control.rlocus import _RLClickDispatcher
66
from control.xferfcn import TransferFunction
77
import matplotlib.pyplot as plt
88

@@ -49,12 +49,14 @@ def test_sisotool(self):
4949

5050
# Move the rootlocus to another point
5151
event = type('test', (object,), {'xdata': 2.31206868287,'ydata':15.5983051046, 'inaxes':ax_rlocus.axes})()
52-
_RLFeedbackClicksSisotool(event=event, sys=self.system, fig=fig, bode_plot_params=bode_plot_params, tvect=None)
52+
_RLClickDispatcher(event=event, sys=self.system, fig=fig,ax_rlocus=ax_rlocus,sisotool=True, plotstr='-' ,bode_plot_params=bode_plot_params, tvect=None)
5353

5454
# Check the moved root locus plot points
5555
moved_point_0 = (np.array([-29.91742755]), np.array([0.]))
5656
moved_point_1 = (np.array([2.45871378]), np.array([-15.52647768]))
5757
moved_point_2 = (np.array([2.45871378]), np.array([15.52647768]))
58+
for line in ax_rlocus.lines:
59+
print(line.get_data())
5860
assert_array_almost_equal(ax_rlocus.lines[-3].get_data(),moved_point_0)
5961
assert_array_almost_equal(ax_rlocus.lines[-2].get_data(),moved_point_1)
6062
assert_array_almost_equal(ax_rlocus.lines[-1].get_data(),moved_point_2)

0 commit comments

Comments
 (0)