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

Coverage is useless? #1179

Closed
cedx opened this issue Feb 12, 2020 · 2 comments
Closed

Coverage is useless? #1179

cedx opened this issue Feb 12, 2020 · 2 comments
Labels

Comments

@cedx
Copy link

@cedx cedx commented Feb 12, 2020

When I generate the code coverage using the --coverage option, I expect that the coverage include the files in the lib directory. Instead, I only get code coverage for the files in the test directory.

The interest of the tests is to know if I correctly cover the files of the "lib" folder.
Is there something I am doing wrong or I have forgotten?

A sample coverage report when using the --coverage option:
https://coveralls.io/builds/28691972

A sample report when I use the coverage package directly:
https://coveralls.io/builds/28653626

@grouma

This comment has been minimized.

Copy link
Member

@grouma grouma commented Feb 12, 2020

Can you give a sample .json output for your coverage run?

Are you passing the --packages argument to the format_coverage command? If not, it's likely any package: URI will not be resolved and therefore not show up in your coverage report.

@grouma grouma added the needs info label Feb 12, 2020
@cedx

This comment has been minimized.

Copy link
Author

@cedx cedx commented Feb 13, 2020

Of course: I forgot the --packages argument! Thanks @grouma: now the coverage works as expected.

@cedx cedx closed this Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.