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

coveralls should read any file that starts with .coverage #25

Closed
thedrow opened this issue Jun 22, 2013 · 4 comments
Closed

coveralls should read any file that starts with .coverage #25

thedrow opened this issue Jun 22, 2013 · 4 comments

Comments

@thedrow
Copy link

thedrow commented Jun 22, 2013

Currently coverage generates coverage data files to .coverage.* format.
coveralls-python only reads files named .coverage.

@coagulant
Copy link
Contributor

I'm not familiar with this kind of coverage files.
If anyone is willing to submit a patch with tests, I'll merge it right away.

@jessamynsmith
Copy link
Contributor

I don't know what version of coverage this was, but I think this issue is stale at this point. Coverage 3.x and 4.x both create .coverage files.

@coagulant
Copy link
Contributor

@jessamynsmith good point.

Closing this. Feel free to reopen, if one provides a case when we need to parse more files than we do now.

@radiac
Copy link

radiac commented Jul 27, 2015

I think this occurs when coverage is called with the -p option - that will create coverage files with unique suffixes so you can combine them later (see coverage docs).

Perhaps I was missing something obvious, but I ran into this when trying to have tox locally combine coverage across multiple environments (using coverage 4.0a5), but still wanting coveralls to find them all when run on travis ci. I found though that you can achieve the same thing by removing the -p option and manually specifying the suffix with an env var in the tox base environment:

[testenv]
setenv = COVERAGE_FILE=.coverage.{envname}
...

Because coveralls uses coverage to find the file, as long as it's run in the same env that generates the coverage report, it will also respect the env var and find the file in a travis instance. When run locally, the coverage files will still have unique names, so can be combined later with coverage combine. For a more detailed example, my working tox.ini is here.

Since this issue has so little activity, either I'm doing something wrong, or this seems to be fairly uncommon usage - either way it doesn't seem worth reopening and modifying code, but perhaps this comment will help others.

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

No branches or pull requests

4 participants