Skip to content

Regression: "No data was collected" with 6.0 when run with tox and namespaces #1231

Closed
@ampedandwired

Description

@ampedandwired

Describe the bug
Coverage 6.0 fails with CoverageWarning: No data was collected when run with tox against a namespaced package. The same test run with coverage 5.5 works correctly and reports 100% coverage.

To Reproduce

  1. What version of Python are you using?
    3.6

  2. What version of coverage.py are you using? The output of coverage debug sys is helpful.
    6.0

  3. What versions of what packages do you have installed? The output of pip freeze is helpful.
    I've reproduced this in a virtualenv with only "tox" and "coverage" installed.

  4. What code are you running? Give us a specific commit of a specific repo that we can check out.
    I've created a minimal repo to reproduce the problem here: https://gitlab.com/ampedandwired/coverage-6-bug

  5. What commands did you run?
    Check out this repo and run tox -e cov6. This will fail with a "no data" warning.
    To compare to the 5.5 behaviour run tox -e cov5. This will show 100% coverage.
    Both commands use the same code, only difference is the "coverage" version.

Expected behavior
I expect coverage 6.0 to behave the same way as coverage 5.5 when it comes to namespace packages.
Perhaps there's a new way of configuring these in 6.0?

Additional context
Coverage 6.0 works OK if run without tox, or without namespaces, so it seems to be something in the combination of those that triggers this problem.

There are some more details in the README of the repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions