Fix real pin tests ... and some other bits

The real pin tests were broken by the new factory stuff. This commit
fixes them up, and fixes up a few other bits besides (like why the
pigpio PWM tests were failing, why RPi.GPIO sometimes segfaulted on PWM
tests, etc.)

It also causes the real pin tests to run against MockPin (thanks to
@lurch for the suggestion!). This required some tweaks to MockPin to
make it emulate physically pulled up pins itself (which in turn
necessitated changing quite a few pin numbers in the main test suite
because we were using 2 and 3 everywhere), and to allow one MockPin to
drive another. Anyway, everything's working now including all the tests
on a Pi (haven't tried RPIO yet, but only because I'm on a Pi3 -
everything else works with overall coverage of 88% :).
This commit is contained in:
Dave Jones
2016-10-22 22:28:33 +01:00
parent 4049ef5094
commit 2495939603
9 changed files with 265 additions and 159 deletions

View File

@@ -77,7 +77,6 @@ __entry_points__ = {
'gpiozero_mock_pin_classes': [
'mockpin = gpiozero.pins.mock:MockPin',
'mockpwmpin = gpiozero.pins.mock:MockPWMPin',
'mockpulleduppin = gpiozero.pins.mock:MockPulledUpPin',
'mockchargingpin = gpiozero.pins.mock:MockChargingPin',
'mocktriggerpin = gpiozero.pins.mock:MockTriggerPin',
],