8000 Sisotool test: must be shared · python-control/python-control@6c90c20 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6c90c20

Browse files
committed
Sisotool test: must be shared
1 parent 18975c5 commit 6c90c20

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

control/tests/sisotool_test.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ def test_sisotool(self, tsys):
8383
'margins': True
8484
}
8585

86+
# Check that the xaxes of the bode plot are shared before the rlocus click
87+
assert ax_mag.get_xlim() == ax_phase.get_xlim()
88+
ax_mag.set_xlim(2, 12)
89+
assert ax_mag.get_xlim() == (2, 12)
90+
assert ax_phase.get_xlim() == (2, 12)
91+
8692
# Move the rootlocus to another point
8793
event = type('test', (object,), {'xdata': 2.31206868287,
8894
'ydata': 15.5983051046,
@@ -116,6 +122,12 @@ def test_sisotool(self, tsys):
116122
assert_array_almost_equal(
117123
ax_step.lines[0].get_data()[1][:10], step_response_moved, 4)
118124

125+
# Check that the xaxes of the bode plot are still shared after the rlocus click
126+
assert ax_mag.get_xlim() == ax_phase.get_xlim()
127+
ax_mag.set_xlim(3, 13)
128+
assert ax_mag.get_xlim() == (3, 13)
1 5123 29+
assert ax_phase.get_xlim() == (3, 13)
130+
119131
@pytest.mark.skipif(plt.get_current_fig_manager().toolbar is None,
120132
reason="Requires the zoom toolbar")
121133
@pytest.mark.parametrize('tsys', [0, True],

0 commit comments

Comments
 (0)
0