8000 MNT Exclude test files from the coverage report by rth · Pull Request #14066 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

MNT Exclude test files from the coverage report #14066

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

Closed
wants to merge 4 commits into from

Conversation

rth
Copy link
Member
@rth rth commented Jun 11, 2019

As mentioned in #13984

this removes test files form the coverage report. As they are always run by definition, this inflates our coverage score somewhat.

@rth rth changed the title MANT Exclude test files from the coverage report MNT Exclude test files from the coverage report Jun 11, 2019
Copy link
Member
@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs newline but LGTM

@qinhanmin2014
Copy link
Member

now there's an extra new line :)
I'm curious why we use ** before setup.py.
and what's the relationship between this and the ignore: part of .codecov.yml?

@thomasjpfan
Copy link
Member
thomasjpfan commented Jun 12, 2019

I'm curious why we use ** before setup.py.

Ah coverage uses another globing pattern: https://coverage.readthedocs.io/en/v4.5.x/source.html#execution This could be *setup.py (and not the ls globing I thought it was using)

and what's the relationship between this and the ignore: part of .codecov.yml?

Ah I think we need to include these in .codecov.yml The .codecov.yml controls what is being displayed in codecov itself. .coveragerc controls what the local coverage (or pytest-cov) command report on.

@jnothman
Copy link
Member

Do we really want to exclude test files from coverage? Including it protects against typos (def tset_blah(), might help us remove unused helpers, and should also ensure that tests skipped on some platforms are run at least once across CI.

@qinhanmin2014
Copy link
Member

Ah I think we need to include these in .codecov.yml The .codecov.yml controls what is being displayed in codecov itself. .coveragerc controls what the local coverage (or pytest-cov) command report on.

I agree to keep these two files consistent.

@rth
Copy link
Member Author
rth commented Jun 13, 2019

Do we really want to exclude test files from coverage? Including it protects against typos (def tset_blah(), might help us remove unused helpers, and should also ensure that tests skipped on some platforms are run at least once across CI.

OK, let's keep them then. In any case, the advantage of removing them is very limited.

@rth rth closed this Jun 13, 2019
@rth rth deleted the exclude-coverage-test-files branch June 13, 2019 14:09
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.

5 participants
0