Commit Graph

17 Commits

Author SHA1 Message Date
Dave Jones
e2b8171bbb Merge pull request #274 from waveform80/doc-reorg
Doc reorganization
2016-04-10 16:58:27 +01:00
Dave Jones
ecc8df8041 Doc reorganization 2016-04-10 16:47:16 +01:00
Andrew Scheller
8e09a077fd Check that the sub-devices of CompositeDevice are actually Device instances 2016-04-10 15:02:34 +01:00
Dave Jones
c2a9392ea5 Make tests work reliably on the Pi
While the tests work well on a PC or Travis, the Pi (where I ought to be
running them!) has some issues with the timing tests. Need to relax the
tolerance of the "assert_states_and_times" method to 0.05 seconds
otherwise it periodically fails even on something reasonably quick like
a Pi 2 (less failures on a Pi 3 but still occasionally).

Also reduced default fps to 25; if the default timing occasionally fails
on a Pi 2 it's evidently too fast for a Pi 1 and shouldn't be the
default; 25 also doesn't look any different to me on a pulsing LED.

There's also a bunch of miscellaneous fixes in here; last minute typos
and chart re-gens for the 1.2 release.
2016-04-08 23:11:14 +01:00
Dave Jones
dc79671b39 Dsiable control_all test on pypy
Timing too random as usual...
2016-04-06 23:20:55 +01:00
Dave Jones
ee3bd6b532 Fix #204 and start readying the release
Also re-numbers energenie sockets 1-4 (as noted by @bennuttall in
comments to #239), and adds several "real pins" tests and board tests.
The bad-PWM stuff is currently disabled as it causes segfaults when
running the tests and I can't seem to trace the cause at the moment.
Finally, I've tweaked the deb config to suggest gpiozero, removed spidev
as a mandatory dep (which'll fix installs on wheezy for py3), and
there's some more miscellaneous last-minute stuff here that I can't
recall...
2016-04-06 23:06:46 +01:00
Dave Jones
3acf8a0d3a More work on the tests... 2016-04-05 13:22:40 +01:00
Dave Jones
92d80d2ae6 Some more tests... 2016-04-05 02:22:38 +01:00
Dave Jones
b6fb4e4d89 Add "real" pins tests
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).
2016-02-21 23:16:24 +00:00
Andrew Scheller
741a8ec7f3 More small MockPin tweaks 2016-02-21 01:24:10 +00:00
Andrew Scheller
c0d70f35f6 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
2016-02-21 00:35:01 +00:00
Andrew Scheller
d914c79207 Small change to test_mock_pin_frequency_unsupported 2016-02-20 17:35:24 +00:00
Andrew Scheller
5c5934a8f3 'Fixed' test_mock_pin_frequency_unsupported
See the discussion at https://github.com/RPi-Distro/python-gpiozero/issues/206#issuecomment-186289488
2016-02-20 13:42:54 +00:00
Andrew Scheller
d1bb5fe66a Added another unit test 2016-02-19 00:19:41 +00:00
Andrew Scheller
504b0b9047 Add some GPIODevice unit-tests 2016-02-18 20:01:13 +00:00
Dave Jones
e8dbe5e3d6 Disable timing tests on pypy
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.
2016-02-11 21:30:13 +00:00
Dave Jones
1f2140a9f5 Work on #87
Implement a test suite, including Travis-CI integration
2016-02-11 21:11:22 +00:00