Giter Site home page Giter Site logo

Comments (8)

nedbat avatar nedbat commented on July 28, 2024

Original comment by Vinay Sajip (Bitbucket: vinay.sajip, GitHub: Unknown)


Sorry, I don't know how I missed that :-/

from coveragepy.

nedbat avatar nedbat commented on July 28, 2024

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.

nedbat avatar nedbat commented on July 28, 2024

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.

nedbat avatar nedbat commented on July 28, 2024

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.

nedbat avatar nedbat commented on July 28, 2024

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.

nedbat avatar nedbat commented on July 28, 2024

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.

nedbat avatar nedbat commented on July 28, 2024

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.

nedbat avatar nedbat commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.