question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Something like luma.core.interface.serial.dummy - for tests?

See original GitHub issue

I’m thinking about covering my luma.core-based drivers with tests. However, our test environment won’t have real hardware accessible for testing. Any practice you’d suggest?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
CRImiercommented, Nov 17, 2018

oh, I see now, thank you! Seems like I confused it with what’d be a dummy display driver.

0reactions
rm-hullcommented, Nov 18, 2018

I’d be inclined to use mock.Mock() as you have discovered…

As to unsafe=True: there was a specific PR (https://github.com/rm-hull/luma.oled/pull/72) to fix an issue (https://github.com/rm-hull/luma.oled/issues/55) where it was causing problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Luma.Core Documentation
luma.core is a component library providing a Pillow-compatible drawing canvas for Python 3, and other functionality.
Read more >
Failing tests on Python 3.5 #55 - rm-hull/luma.oled - GitHub
The errors I encountered were because in a previous version there was a mock.py class in the tests directory (which I had removed)...
Read more >
Luma.Core Documentation - Read the Docs
luma.core.serial. Encapsulates sending commands and data over a serial interface, whether that is I2C, SPI or bitbanging GPIO.
Read more >
Mocking in C# Unit Tests - How To Test Data Access Code ...
Unit tests are great, but how do you test your data access? You sure don't want to actually delete records when you are...
Read more >
How YOU can Learn Mock testing in .NET Core and C# with ...
Lastly, we might want to assert that a certain behavior takes place. Demo, let's write some code that has more than one execution...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found