mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Run all tests on all platforms
Also renamed GPIOZERO_INPUT_PIN to GPIOZERO_TEST_INPUT_PIN, and fixed up the pigpio factory so it actually raises an exception if the connection fails and we don't try and control the daemon anymore.
This commit is contained in:
@@ -84,6 +84,10 @@ class PiGPIOFactory(PiFactory):
|
||||
('software', 'shared'): PiGPIOSoftwareSPIShared,
|
||||
}
|
||||
self._connection = pigpio.pi(host, port)
|
||||
# Annoyingly, pigpio doesn't raise an exception when it fails to make a
|
||||
# connection; it returns a valid (but disconnected) pi object
|
||||
if self.connection is None:
|
||||
raise IOError('failed to connect to %s:%s' % (host, port))
|
||||
self._host = host
|
||||
self._port = port
|
||||
self._spis = []
|
||||
|
||||
Reference in New Issue
Block a user