mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Fix #278
Allow the creation of remote pins easily with PiGPIOPin. Also changes DefaultPin to a pin_factory callable which accepts the input pin number.
This commit is contained in:
@@ -19,9 +19,9 @@ def setup_function(function):
|
||||
import gpiozero.devices
|
||||
# dirty, but it does the job
|
||||
if function.__name__ in ('test_robot', 'test_ryanteck_robot', 'test_camjam_kit_robot'):
|
||||
gpiozero.devices.DefaultPin = MockPWMPin
|
||||
gpiozero.devices.pin_factory = MockPWMPin
|
||||
else:
|
||||
gpiozero.devices.DefaultPin = MockPin
|
||||
gpiozero.devices.pin_factory = MockPin
|
||||
|
||||
def teardown_function(function):
|
||||
MockPin.clear_pins()
|
||||
|
||||
Reference in New Issue
Block a user