-
Notifications
You must be signed in to change notification settings - Fork 139
.coveragerc
vs. tox.ini
#144
Comments
Did you manage to get this solved? :( |
I fixed my issue. My use case worked when I used:
where envvar=NO would be set if i wasnt using it 😄 |
@Ademord Yeah, it seems it does not apply to my use case, but thanks for sharing! 😊 |
I'm not sure if this applies to your use case (and also I'm 4 years late), but codecov supports a section in their yaml file (codecov.yml in root directory) called
|
I think that the situation it getting worse since almost everyone is moving to pyproject.toml including coveragepy. I observed that codecov does not load the excludes from the valid codeveragepy config. ansible/ansible-lint@main/pyproject.toml#L13-L24 In my particular case I was interested about |
Initial setup
I have a
.coveragerc
file like:I run my tests with
tox
which in turn runspytest
withpytest-cov
, which means mytox.ini
file looks like this:Then:
tox
in my machine the showed report correctly excludes those lines.tox
, it also shows the correct report, with those lines excluded.tox
, the CI service runscodecov
and the report uploaded to Codecov is also correct.Broken setup
Now I remove
.coveragerc
file and move those lines totox.ini
:Then:
tox
in my machine the showed report correctly excludes those lines.tox
, it also shows the correct report, with those lines excluded.tox
, the CI service runscodecov
and the report uploaded to Codecov, this time, differs. It does not have those excluded lines, so they are reported as not covered.Questions
codecov
to specify the coverage configuration is intox.ini
codecov
read that file by default?The text was updated successfully, but these errors were encountered: