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

Include new library files in coverage measurement #52

Open
alexmojaki opened this issue Sep 22, 2022 · 3 comments
Open

Include new library files in coverage measurement #52

alexmojaki opened this issue Sep 22, 2022 · 3 comments

Comments

@alexmojaki
Copy link
Owner

Currently GHA has coverage run --include=executing/executing.py <run tests> which doesn't measure coverage in the recently added files in the executing folder. The original motivation was lines in __init__.py that would never be covered, but that should be handled by a # pragma: no cover comment or something.

@15r10nk
Copy link
Collaborator

15r10nk commented Sep 27, 2022

Can we also add the tests/ folder to the coverage analysis? It should be assumed that the tests are always executed to 100% but I experienced several times that this is not always the case.

The error reporting for example had some issues in #51, which was not noticeable because it was not covered by the tests.

Some way to generate the coverage html reports locally would also be helpful.

@pwwang
Copy link
Collaborator

pwwang commented Sep 27, 2022

You need a .coveragerc file, specially with omit section:

https://coverage.readthedocs.io/en/latest/config.html#run-omit

@alexmojaki
Copy link
Owner Author

Can we also add the tests/ folder to the coverage analysis? It should be assumed that the tests are always executed to 100% but I experienced several times that this is not always the case.

If you want, but let's consider that a higher goal. It's not something I've done before.

You need a .coveragerc file, specially with omit section:

For the main library files, probably not. If we include the tests folder, that'd probably be a good way to exclude samples.

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

3 participants