Skip to content

Commit f7d74b2

Browse files
author
Mark
committed
Fix bug in tests and lti.py.
1 parent ce11d0b commit f7d74b2

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

control/lti.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def _dcgain(self, warn_infinite):
205205
def ispassive(self):
206206
# importing here prevents circular dependancy
207207
from control.passivity import ispassive
208-
ispassive(self)
208+
return ispassive(self)
209209

210210
#
211211
# Deprecated functions

control/tests/passivity_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ def test_ispassive_edge_cases(test_input, expected):
5555

5656

5757
def test_transfer_function():
58-
sys = tf([1], [1, -2])
58+
sys = tf([1], [1, 2])
5959
assert(passivity.ispassive(sys))
6060

61-
sys = tf([1], [1, 2])
61+
sys = tf([1], [1, -2])
6262
assert(not passivity.ispassive(sys))
6363

6464

@@ -70,5 +70,5 @@ def test_oo_style():
7070
sys = ss(A, B, C, D)
7171
assert(sys.ispassive())
7272

73-
sys = tf([1], [1, -2])
73+
sys = tf([1], [1, 2])
7474
assert(sys.ispassive())

0 commit comments

Comments
 (0)