Skip to content

Commit 6e06a9c

Browse files
committed
small change to unittests
1 parent 9f13a77 commit 6e06a9c

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

control/rlocus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def root_locus(sys, kvect=None, xlim=None, ylim=None, plotstr='b' if int(matplot
102102
start_mat = _RLFindRoots(nump, denp, [1])
103103
kvect, mymat, xlim, ylim = _default_gains(nump, denp, xlim, ylim)
104104
else:
105-
start_mat = _RLFindRoots(nump, denp, kvect[0])
105+
start_mat = _RLFindRoots(nump, denp, [kvect[0]])
106106
mymat = _RLFindRoots(nump, denp, kvect)
107107
mymat = _RLSortRoots(mymat)
108108

control/tests/rlocus_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_without_gains(self):
4545
roots, kvect = root_locus(sys, Plot=False)
4646
self.check_cl_poles(sys, roots, kvect)
4747

48-
def testRootLocusZoom(self):
48+
def test_root_locus_zoom(self):
4949
"""Check the zooming functionality of the Root locus plot"""
5050
system = TransferFunction([1000], [1, 25, 100, 0])
5151
root_locus(system)

control/tests/sisotool_test.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ def test_sisotool(self):
2626
assert_array_almost_equal(ax_rlocus.lines[1].get_data(),initial_point_1)
2727
assert_array_almost_equal(ax_rlocus.lines[2].get_data(),initial_point_2)
2828

29-
# Check the bode plot magnitude line
30-
bode_mag_original = np.array([ 15.12670407, 12.48358602, 10.28367521, 8.44961576, 6.91740918, 5.63436301, 4.55750665, 3.65237575, 2.89200358, 2.25587634])
31-
assert_array_almost_equal(ax_mag.lines[0].get_data()[1][10:20],bode_mag_original)
32-
3329
# Check the step response before moving the point
3430
step_response_original = np.array([ 0., 0.02233651, 0.13118374, 0.33078542, 0.5907113, 0.87041549, 1.13038536, 1.33851053, 1.47374666, 1.52757114])
3531
assert_array_almost_equal(ax_step.lines[0].get_data()[1][:10],step_response_original)

0 commit comments

Comments
 (0)