Running Tests

Testing Example

from lager import lager

gateway = lager.Lager()

# Start a test
gateway.test_start()

# Read GPIO 0
state = gateway.gpio.read(0)

if state == 0:
    gateway.test_fail("GPIO 0 should be high")
else:
    gateway.test_success("It worked!")