This is just a quicky for people to start playing with - it's not
complete in any way, shape, or form. This is how I envisage the "real"
pin tests being done; part of the test suite with a `skipif` to ensure
they don't get run on non-Pi platforms, with a fixture to loop over
whatever pin implementations are found (we can't always assume all of
them: for example, RPIO doesn't work on a Pi 2), and a relatively simple
wiring for the test.
In this case I've assumed GPIOs 22 and 27 are wired together. They're
next to each other, so a jumper is sufficient to run the test.
PRs extending the coverage are very welcome (I've already discovered and
fixed several silly bugs in NativePin!). I've left all the interesting
hard stuff for people to play with (PWM testing: statistical sampling?
debounce compensation testing: timing?). When I've got a second, I'll
looking into hooking up my Pi Zero as a Travis-esque test-bed for this,
triggered by GitHub webhooks (not sure how I'll deal with reporting
yet).
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
Doing timing tests on pypy (for blink) just doesn't work; even with a
tolerance as coarse as tens-of-milliseconds, things fail. I guess that
isn't too surprising given that, as the tests are one off things the
pypy JIT is never getting a chance to spin up and do its stuff.