Ensure pump actually stops and releases lock

This commit is contained in:
Phil Howard
2020-11-13 12:25:15 +00:00
parent 4aa4119fd7
commit 9559a05a41
2 changed files with 16 additions and 3 deletions

View File

@@ -1,6 +1,16 @@
import time
def test_pumps_actually_stop(GPIO, smbus):
from grow.pump import Pump, global_lock
ch1 = Pump(channel=1)
ch1.dose(speed=0.5, timeout=0.05, blocking=False)
time.sleep(0.1)
assert ch1.get_speed() == 0
def test_pumps_are_mutually_exclusive(GPIO, smbus):
from grow.pump import Pump, global_lock