Skip to content

Conversation

@jakirkham
Copy link
Member

Seems that Python 2 was getting left out of the mix. However sometimes code needs to be special cased for Python 2. As these branches were not being counted if tested on Python 2, it caused the coverage to dip superficially. Hence this changes tox to track coverage on all Python versions and report the results.

@jakirkham jakirkham mentioned this pull request Oct 26, 2017
Seems that Python 2 was getting left out of the mix. However sometimes
code needs to be special cased for Python 2. As these branches were not
being counted if tested on Python 2, it caused the coverage to dip
superficially. Hence this changes tox to track coverage on all Python
versions and report the results.
@alimanfoo
Copy link
Member

Thanks, I've made a PR #171 which re-instates coverage for all pythons, and also adds a pragma so coverage can be excluded based on which major python version. Previously I had just focused on PY3 and put "pragma no cover" for all PY2 code lines, hence I thought there was no point in including PY2 in coveralls, however this made me look for a way to handle exclusions better.

@jakirkham
Copy link
Member Author

Cool, your PR seems fine to me. Adding pragmas for Python versions is a nice touch as well.

@jakirkham jakirkham closed this Oct 26, 2017
@jakirkham jakirkham deleted the collect_coverage_always branch October 26, 2017 23:05
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.

2 participants