-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add code coverage to tests #8
Comments
Somewhat related: it might be worth adding a note somewhere on the requirements for running the tests locally. As well as the standard of needing Somewhere, I would add a note of test-requirements, and maybe some instructions on running tests locally (this is perhaps most relevant in a contributor guide, as you would likely want contributors to run and check tests. As a note, I was able to run tests locally. I'm not sure of the coverage (adding that is a good idea), though the GUI tests looked (in terms of how many things popped up) fairly comprehensive. |
@TomDonoghue, I've included testing instructions in the contributor guide (see 6685c6e). |
@sappelhoff, I now collect and report code coverage. However, the coverage is deceptively low (59%) since pytest-cov does not seem to pick up on code that is run within threads (see here). Looking into it. |
Closing and transfering to #21, since original issue has been addressed. |
related to JOSS review (openjournals/joss-reviews#2621)
It would be great to add a tool that measures what proportion of your code is actually covered by the tests.
It's helpful to:
This would be quite easy to implement, e.g., using pytest extensions and codecov as in this repository: https://github.com/sappelhoff/pyprep
pytest-cov
(https://github.com/sappelhoff/pyprep/blob/da8e3a64cac7759e553d9dc219a88edc13f3b6cb/requirements-dev.txt#L10)Finally, you could add a coverage badge next to your tests:
The text was updated successfully, but these errors were encountered: