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

[Enhancement] Add test coverage reports #342

Merged
merged 3 commits into from
Mar 3, 2023

Conversation

kdmukai
Copy link
Contributor

@kdmukai kdmukai commented Mar 3, 2023

Add test suite coverage reports

Note: The current test suite only runs on Raspi hardware (#339 will move testing to non-Raspi local dev).

Changes

  • Adds new test-only dependency in tests/requirements.txt for coverage.
  • .coveragerc configuration.
  • See the usage notes for coverage in the tests/README.md.
  • Additional tests in test_mnemonic_generation.py to prototype improving test coverage.

tldr

pip install coverage
coverage run -m pytest
coverage report
coverage html

Open the resulting coverage html. Click into any listed file and explore which lines of code the tests did or did not execute.

tests/README.md Outdated Show resolved Hide resolved
@jdlcdl
Copy link

jdlcdl commented Mar 3, 2023

ACK tested.

This worked for me on the pi2.
same: as of be7d8be

I left some notes on code lines above, where my eye caught something obvious. already corrected in b05a16d

I really like this pr as it gives us a way to quantify our test coverage and better yet to go hunt down where we can improve it. I'm all for merging this as soon as reviewed ... so that it's absence isn't a blocker for Keith's other branches/prs, and so other can build on this too.

Nicely done!

@newtonick
Copy link
Collaborator

ACK, tested

This is a great PR. I'm familiar with the concept of code coverage but never used "coverage" in python.

I was able to run and see the coverage report on cli and review the html output version after copying over from the pi to my computer. I skimmed through the config without understanding most of it. I don't think this requires my understanding and should not hold up merging this PR.

@newtonick newtonick merged commit 2570dfe into SeedSigner:dev Mar 3, 2023
@kdmukai kdmukai deleted the add_test_coverage branch September 2, 2024 13:52
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

Successfully merging this pull request may close these issues.

3 participants