You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/TestConvert.py
+10-7Lines changed: 10 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,13 @@
4
4
5
5
Test state space and transfer function conversion.
6
6
7
-
Currently, this unit test script is not complete. It converts
8
-
several random state spaces back and forth between state space and transfer
9
-
function representations, and asserts that the conversion outputs are correct.
10
-
As it stands, tests pass but there is some rounding error in one of the conversions leading to imaginary numbers. See the warning message. This script may be used to diagnose errors.
7
+
Currently, this unit test script is not complete. It converts several random
8
+
state spaces back and forth between state space and transfer function
9
+
representations. Ideally, it should be able to assert that the conversion
10
+
outputs are correct. This is not yet implemented.
11
+
12
+
Also, the conversion seems to enter an infinite loop once in a while. The cause
13
+
of this is unknown.
11
14
12
15
"""
13
16
@@ -22,11 +25,11 @@ def setUp(self):
22
25
"""Set up testing parameters."""
23
26
24
27
# Number of times to run each of the randomized tests.
25
-
self.numTests=1
28
+
self.numTests=10
26
29
# Maximum number of states to test + 1
27
-
self.maxStates=3
30
+
self.maxStates=2
28
31
# Maximum number of inputs and outputs to test + 1
0 commit comments