You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 14, 2026. It is now read-only.
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.
One other change that I think is worth making: In
authbox/__init__.pywe 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__.pyshould 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)