MockPin improvements

Change MockPin (and MockPWMPin) to make them behave more like 'real' pins - fixes #206
Add new MockPin tests, and rework some of the existing ones
Incorporate #216
This commit is contained in:
Andrew Scheller
2016-02-20 19:18:41 +00:00
parent 80dfee5c3f
commit c0d70f35f6
6 changed files with 150 additions and 34 deletions

View File

@@ -20,6 +20,9 @@ from gpiozero.pins.mock import MockPin, MockPWMPin
from gpiozero import *
def teardown_function(function):
MockPin.clear_pins()
def test_output_initial_values():
pin = MockPin(2)
device = OutputDevice(pin, initial_value=False)