Skip to content

Coverage environment in Tox does not measure coverage accurately #80

Open
@Daverball

Description

@Daverball

The environment for coverage currently only is run on a specific Python/SQLAlchemy version and without the two Postgres specific test-runs on the CI, as such it does not accurately represent the coverage.

I have found that the best way to do coverage reports with tox and multiple environments is to set the environment variable that changes the name of the .coverage file, so each environment calculates the coverage and creates a unique file. Then at the end you run your report environment to stitch them together.

On the CI you would either have to create Artifacts and use them in a final dependent runner that stitches them together, or possibly coveralls supports stitching them together for you, if you upload multiple coverage reports from the same commit. (I know Codecov supports uploading multiple reports and stitches them together for you, but I have never used coveralls)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status

      Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions