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

add option to append coverage instead of deleting the .coverage file … #80

Closed
wants to merge 4 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@cleder
Contributor

cleder commented Aug 13, 2015

fixes #79

@ionelmc

This comment has been minimized.

Member

ionelmc commented Aug 13, 2015

Hey. Thanks for making the change :)

But can you rename the option to --cov-append? All the other options start with --cov.

@schlamar

This comment has been minimized.

Contributor

schlamar commented Aug 14, 2015

We should have a test for this.

cleder added some commits Aug 19, 2015

@cleder

This comment has been minimized.

Contributor

cleder commented Aug 19, 2015

added tests and some documentation to README

@ionelmc

This comment has been minimized.

Member

ionelmc commented Aug 19, 2015

I was wondering if we'd be better off with assertions on stdout (like here https://github.com/pytest-dev/pytest-cov/blob/master/tests/test_pytest_cov.py#L230-L235). That would ensure the loading works properly (your current assertions with the size might pass if you remove --cov-append). What do you think?

ionelmc added a commit that referenced this pull request Aug 23, 2015

@ionelmc ionelmc closed this in 59deb8e Aug 23, 2015

@ionelmc

This comment has been minimized.

Member

ionelmc commented Aug 23, 2015

Alright, this is included in master and fixed up a bit for xdist support. Thanks.

@aldanor

This comment has been minimized.

aldanor commented Oct 28, 2015

Wonder if the coverage is persisted between runs? (in which case, how would it be possible to reset it so it still gets combined for all environments but not across different runs?)

@ionelmc

This comment has been minimized.

Member

ionelmc commented Oct 28, 2015

@aldanor

This comment has been minimized.

aldanor commented Oct 28, 2015

@ionelmc I see, thanks. Feels a bit like a hack of course, because if you pass environments explicitly, e.g. -e py27 -e py34, this wouldn't work..

I guess the best use case would be gathering combined coverage for all Python versions within one run -- isn't it quite common?

@ionelmc

This comment has been minimized.

Member

ionelmc commented Oct 28, 2015

@aldanor pytest don't support multiple python version testing, so we can't do anything special regarding that in pytest-cov. It's something that Tox solves - but it it has some inconveniences as you saw. If you want to use detox see this.

@The-Compiler

This comment has been minimized.

Member

The-Compiler commented Oct 29, 2015

One could probably write a tox plugin to do that though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment