Comments (8)
Original comment by Vinay Sajip (Bitbucket: vinay.sajip, GitHub: Unknown)
Sorry, I don't know how I missed that :-/
from coveragepy.
Vinay: the .coveragerc file has a [paths] section specifically to handle this case, and I've been using it for my windows/ubuntu runs: http://nedbatchelder.com/code/coverage/config.html#config-paths Let me know if you find problems with it.
from coveragepy.
Original comment by Vinay Sajip (Bitbucket: vinay.sajip, GitHub: Unknown)
I'm still having trouble combining results from Windows and POSIX coverage runs, on 3.6b2 and 3.6b3. As it happens, although the projects are identical on both platforms, the project root directory is different on the two platforms. I don't know if this is why I'm getting a problem combining results. Ideally you would have a way of mapping project root directories on different machines so that combine can do the right thing.
To reproduce, clone https://bitbucket.org/vinay.sajip/distlib and do coverage run -p
on Windows and POSIX machines, then attempt to do coverage combine
with the individual .coverage
files.
from coveragepy.
This is now fixed in 3.5.1b1: <<changeset 2e2000b470aa (bb)>>, and the dozen leading up to it.
Note that I solved the problem differently, and could use testing.
from coveragepy.
Original comment by Geoff Bache (Bitbucket: geoffbache, GitHub: Unknown)
New patch provided: now works from rc file, is based on today's trunk and has no other changes included.
I also attach a zipfile illustrating usage/testing: if you cd into "testcover" and then execute
coverage combine --rcfile=rcfile ; coverage report
it should report 100% on python source which cannot get 100% coverage using today's coverage.py.
from coveragepy.
Original comment by Geoff Bache (Bitbucket: geoffbache, GitHub: Unknown)
OK. I guess I should rework it to use the rc file then (presumably a new [combine] section). Any opinions on what the setting should be called?
The point of the case-fixup for Windows is that the point of this is to combine paths from different platforms. Windows understands POSIX-style paths but the reverse is not true. The idea is to make this work for a "coverage combine" process running on a posix os, processing a file that has been produced on Windows.
from coveragepy.
Geoff, a patch against trunk for just one fix at a time would be great. I think the other two fixes in that patch are now in the code anyway. And yes, I am focusing primarily on the rc file as a way to add options. The command line is cluttered and not usable through testrunner plugins.
About the code: I noticed the case-fixup for Windows, but it's only run if running on a posix os. Can you explain that to me?
from coveragepy.
Original comment by Geoff Bache (Bitbucket: geoffbache, GitHub: Unknown)
Hi again,
As I was just patching this change into my version of coverage 3.4 (having previously done so for 3.2 and 3.3) I thought I'd ask if there was any prospect of this going in any time soon? It isn't particularly difficult and I'll happily provide a new patch against trunk if you want. Or make it work via the rc file if you prefer.
/Geoff
from coveragepy.
Related Issues (20)
- HTML column sorting is inconsistent across index pages HOT 4
- 7.5.0 broke coverage-badge HOT 2
- How to use coverage.py to measure the coverage of the torch library using a series of python files?
- Branch coverage false positive for exit context HOT 5
- coverage html crashes with RecursionError in ast traversal HOT 11
- Incorrect missed-branch message with return/finally/if
- On Windows, `test_wrong_alias_doesnt_work` fails if the error message contains bytes that UTF-8 cannot decode HOT 4
- Nested matches of exclude_lines patterns leads to unmatched lines being excluded HOT 3
- Add a hint that `coverage combine` might be needed
- Allow disabling parallel mode from the command line HOT 3
- BUG: inconsistent meaning of `skip_covered` between `coverage report` and `coverage html`
- MemoryError in `coverage report` on Python 3.12 HOT 5
- Zero coverage of process spawned by dogtail HOT 4
- oss-fuzz 69058: TokenError HOT 4
- Support coverage plugins with sys.monitoring
- Memory leak when generating reports HOT 18
- Line incorrectly reported as uncovered in python 3.11 involving `asyncio.to_thread` and a conditional
- A way to get report data in detail HOT 15
- `continue` incorrectly marked as uncovered on python 3.9 HOT 2
- pragma: no cover ignored and coverage wrongly calculated HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coveragepy.