Skip to content

Commit abee3d3

Browse files
Update test_stepper.py
1 parent 163d7ca commit abee3d3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_stepper.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ def __init__(self):
3535

3636
@property
3737
def frequency(self):
38+
"""Default frequency setting"""
3839
return 1500
3940

4041
@property
4142
def duty_cycle(self):
43+
"""16-bit duty cycle value"""
4244
return self._duty_cycle
4345

4446
@duty_cycle.setter
@@ -48,6 +50,7 @@ def duty_cycle(self, value):
4850

4951

5052
def test_single_coil():
53+
"""Tests single coil"""
5154
coil = (Coil(), Coil(), Coil(), Coil())
5255
# We undo the coil order so our tests make more sense.
5356
motor = stepper.StepperMotor(coil[2], coil[0], coil[1], coil[3])
@@ -61,6 +64,7 @@ def test_single_coil():
6164

6265

6366
def test_double_coil():
67+
"""Tests double coil"""
6468
coil = (Coil(), Coil(), Coil(), Coil())
6569
# We undo the coil order so our tests make more sense.
6670
motor = stepper.StepperMotor(coil[2], coil[0], coil[1], coil[3])
@@ -76,6 +80,7 @@ def test_double_coil():
7680

7781

7882
def test_interleave_steps():
83+
"""Tests interleave steps"""
7984
coil = (Coil(), Coil(), Coil(), Coil())
8085
# We undo the coil order so our tests make more sense.
8186
motor = stepper.StepperMotor(coil[2], coil[0], coil[1], coil[3])
@@ -103,6 +108,7 @@ def test_interleave_steps():
103108

104109

105110
def test_microstep_steps():
111+
"""Tests microsteps"""
106112
coil = (Coil(), Coil(), Coil(), Coil())
107113
# We undo the coil order so our tests make more sense.
108114
motor = stepper.StepperMotor(coil[2], coil[0], coil[1], coil[3], microsteps=2)
@@ -135,6 +141,7 @@ def test_microstep_steps():
135141

136142

137143
def test_double_to_single():
144+
"""Tests double to single movement"""
138145
coil = (Coil(), Coil(), Coil(), Coil())
139146
# We undo the coil order so our tests make more sense.
140147
motor = stepper.StepperMotor(coil[2], coil[0], coil[1], coil[3])
@@ -168,6 +175,7 @@ def test_double_to_single():
168175

169176

170177
def test_microstep_to_single():
178+
"""Tests microsteps to single movement"""
171179
coil = (Coil(), Coil(), Coil(), Coil())
172180
# We undo the coil order so our tests make more sense.
173181
motor = stepper.StepperMotor(coil[2], coil[0], coil[1], coil[3])

0 commit comments

Comments
 (0)