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

Create automated test process #10

Open
martinohanlon opened this issue Feb 23, 2022 · 4 comments
Open

Create automated test process #10

martinohanlon opened this issue Feb 23, 2022 · 4 comments

Comments

@martinohanlon
Copy link
Collaborator

Using pytest with mock or something else maybe running on the pico itself?

@martinohanlon
Copy link
Collaborator Author

I have made a proof of concept for running automated tests directly on the pico. It is in the tests branch.

https://github.com/RaspberryPiFoundation/picozero/tree/tests/tests

@martinohanlon
Copy link
Collaborator Author

I have refactored the poc to use unittest rather than my own "homegrown" test runner and written a significant number of tests for both input and output devices.

@martinohanlon
Copy link
Collaborator Author

I am going to merge the tests branch into dev. I have created tests for the main base devices (DigitalInput, DigitalOutput, AnalogInput, AnalogOutput, etc) and it seems to work and be helpful. Its getting difficult managing the 2 branches particularly when I find an issue when writing a test.

@martinohanlon
Copy link
Collaborator Author

I thought I could close this but test coverage is missing for Speaker and DistanceSensor :(

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

No branches or pull requests

1 participant