-
Notifications
You must be signed in to change notification settings - Fork 29
Description
One other change that I think is worth making: In authbox/__init__.py we have logic to replace RPi.GPIO on the import path with a fake if the real one is missing. But if you try running unit tests outside of venv, on Raspbian, and with Python2, then the real GPIO is already installed by default and it prevents unit tests from working.
Now that tests are in their own module, I think authbox/tests/__init__.py should instead do the fake RPi.GPIO replacement unconditionally.
A higher level design question though is how do we want to handle this kind of dependency injection going forward? We're doing it globally for GPIO, but via __init__() for fake queue/timer. We could also have each unit test patch the module under test.
Originally posted by @thvortex in #36 (comment)