Problem when combining windows generated data on linux machine

Issue #618 resolved
Former user created an issue

If i have the following directory structure:

- project/
    - module/
        - tests/

a coveragerc with the folowing paths configuration:

source =

The windows data file contains:

! This is a private format, don't read it directly!{"lines":{"C:\\a\\path\\somewhere\\coveragepy_test\\project\\module\\tests\\":[1,2,3,4]}}

When i run, on a Linux machine:

$ coverage combine

the resulting coverage data file is:

! This is a private format, don't read it directly!{"lines":{"/tmp/coveragepy_test/project/module/tests\\":[1,2,3,4]}}

I tried many different [paths] configuration with no luck.

I'm uploading a .tar.gz with the same scenario so you only need to do coverage combine to see the problem happening.

let me know if I can provide more information.


Comments (7)

  1. Ned Batchelder repo owner

    @brunogola Can you say more about what the actual problem is? Where do things go wrong?

  2. Ned Batchelder repo owner

    This sounds like something having to do with [paths]. I can help figure out what's going wrong if you link to the code, etc.

  3. Bruno Gola

    hi @ned, the problem is that the resulting data file has a wrong path ("/tmp/coveragepy_test/project/module/tests\")

    if you download the .tar file and run (on linux):

    coverage combine

    check the .coverage file.

    there is a .coveragerc in the .tar, i believe the [paths] setting is right.

    thanks for the reply

  4. Ned Batchelder repo owner

    OK, I finally understand: the specific wrong thing is the backslash in the path, since it should be a Linux path. Interestingly, if you swap the last two lines in your [paths] configuration, it works, though it might not then on Windows. I'm looking into it.

  5. Log in to comment