Skip to content

Code coverage is starting too late, even when using pytest without any other tools #188

Open
@mark0978

Description

@mark0978

I'm using:

pytest -n 8 -xv --cov --cov-config ./.coveragerc --cov-report html --cov-append -s 

and

pytest -n 1 -xv --cov --cov-config ./.coveragerc --cov-report html --cov-append -s 

and it appears coverage is getting started after some of the modules have been imported.

Running

coverage run `which pytest`

solves this problem, but it seems like the pytest-cov plugin shouldn't need this.

The bizarre part is that it doesn't affect all of the files, some of my files do have 100% coverage, but there are quite a few files where the def is not covered but the body is which is telling me something is happening in the wrong order.

I really want to use py-cov because I can run with -n 8

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions