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.0.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.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for pytest_circleci_coverage-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1174f884dc471456d4777ee22d20cbb67836f171882c935c403f795667eee7cf
MD5 d98cb8ba98e2b7508178b0ffd8fe0598
BLAKE2b-256 1ee3baf11a6f7f1cf1f150d9d82a2e491d6e4dcef7df94071020c2ab4d1451f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytest_circleci_coverage-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a1d4df1fcf1f59b04739a49e8183ed0707705afc7919c8f10bf19317825a642
MD5 4b4107c5e2a3db55f9315b872a5284b7
BLAKE2b-256 7cd1ed71ff5d9d724a1c4e29c3abc2d07a9796855f52fcc052ef40fd2a1627af

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