Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot properly mock luma.emulator.device and RPi.GPIO imports in tests, need help #135

Open
CRImier opened this issue Nov 21, 2018 · 0 comments

Comments

@CRImier
Copy link
Member

CRImier commented Nov 21, 2018

I'm trying to cover some input drivers in the tests/test_drivers.py file, and I ran into a problem - I don't yet understand how to mock multi-level imports (like import luma.emulator.device). So, some input drivers (emulator, pi_gpio and pi_gpio_matrix) are currently not covered by tests because luma.emulator.device and RPi.GPIO can't be mocked. I can't yet figure it out, I've left some attempts in the tests/test_drivers.py file (linked above), but the tests are skipped for now. If someone could help figure this out, it would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant