Skip to content

pytest-cov + xdist + remote workers #232

Open
@simon-weber

Description

@simon-weber

Our CI uses an xdist setup with remote tcp workers (--tx socket=...) to run a large test suite. As far as I can tell, pytest-cov supports this. But, when I use --cov=., the report only contains files/lines that (I suspect) are imported by the master process, such as our conftest. Running without xdist reports the expected coverage.

So, before going too much further, I wanted to check: is this form of xdist supported? There are a few other issues, but they only refer to multi-process mode. If so, any ideas as to how I can go about debugging this? If not, any ideas on how I could still collect coverage with this configuration?

Here's some relevant package versions, in case it's helpful:

  • cov==2.6.0
  • coverage==4.4.1
  • pytest==3.6.0
  • pytest-cov==2.6.0
  • a slightly modified fork of xdist 1.22.2 described here
  • python 2.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions