Cannot properly mock luma.emulator.device
and RPi.GPIO
imports in tests, need help
#135
Labels
luma.emulator.device
and RPi.GPIO
imports in tests, need help
#135
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 (likeimport luma.emulator.device
). So, some input drivers (emulator, pi_gpio and pi_gpio_matrix) are currently not covered by tests becauseluma.emulator.device
andRPi.GPIO
can't be mocked. I can't yet figure it out, I've left some attempts in thetests/test_drivers.py
file (linked above), but the tests are skipped for now. If someone could help figure this out, it would be great.The text was updated successfully, but these errors were encountered: