Skip to main content

Pytest plugin that works with pytest-cov to generate coverage data for CircleCI's Smarter Testing

Project description

pytest-circleci-coverage

A pytest plugin that works with pytest-cov to generate coverage data for CircleCI's Smarter Testing.

Usage

Install the plugin via git.

python -m pip install pytest-circleci-coverage

Install pytest-cov.

Run pytest with coverage and the --circleci-coverage flag to generate coverage JSON.

pytest --cov --cov-context=test --circleci-coverage=coverage.json

Development

Running tests

Install the plugin locally in editable mode.

pip install --editable .

Run tests.

pytest

To generate the coverage.json, used in the CI integration test.

circleci testsuite "integration test" --local --analyze-tests="all" && cat coverage.json | jq --sort-keys > coveragetmp.json && mv coveragetmp.json coverage.json

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_circleci_coverage-0.1.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_circleci_coverage-0.1.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file pytest_circleci_coverage-0.1.1.tar.gz.

File metadata

File hashes

Hashes for pytest_circleci_coverage-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f3dc6c9fae211efc139a54c8f0306683415f3d16e6ea80de8ef9f7ac886937a0
MD5 0e28f2d7343225dc1dc2a48618ae13ab
BLAKE2b-256 3e8709eaf078347f442db3b0a0846b8a8743c556d79de47ea308beecca30a77b

See more details on using hashes here.

File details

Details for the file pytest_circleci_coverage-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_circleci_coverage-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9bd46353e97feefb4b0dc855474ab4fa7609921c446b6f07505b1dd5c4e05b91
MD5 1ed269ffb5da570d1c45810c533f2577
BLAKE2b-256 84d8d44ecef09712c9a54450762c19cd37a279d182e8d54c3c22bbf025af25cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page