Skip to content

Commit 51654fc

Browse files
authored
More tests for motors (#129)
1 parent 838d850 commit 51654fc

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/motors.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,23 @@ def test_del(self):
8383
del m1
8484
m1 = Motor('A')
8585

86+
def test_continuous_start(self):
87+
t = time.time() + (60*5)
88+
m = Motor('A')
89+
while time.time() < t:
90+
m.start(0)
91+
92+
def test_continuous_degrees(self):
93+
t = time.time() + (60*5)
94+
m = Motor('A')
95+
while time.time() < t:
96+
m.run_for_degrees(0)
97+
98+
def test_continuous_position(self):
99+
t = time.time() + (60*5)
100+
m = Motor('A')
101+
while time.time() < t:
102+
m.run_to_position(0)
103+
86104
if __name__ == '__main__':
87105
unittest.main()

0 commit comments

Comments
 (0)