Skip to main content

A coverage plugin for Ward testing framework

Project description

Ward Coverage

CI/CD MyPy Lint Security Rating PyPI - Downloads

Disclaimer: Albeit useful already, this is a work-in-progress and should be seen as such.

A coverage plugin for Python's Ward testing framework

Example image

Installation

Build the plugin:

poetry build

and install using

pip install dist/ward_coverage-0.1.1-py3-none-any.whl

Configuration

To include coverage in your test run, add the following to your pyproject.toml:

[tool.ward]
hook_module = ["ward_coverage"]

There are several options to configure the plugin which can be included under section [tool.ward.plugins.coverage], namely:

  • report_type, defaulting to ["term"], which is a list of report types to generate. Possible values are one or more of 'lcov', 'html', 'xml', 'json', 'term'
  • threshold for minimum coverage, affecting the color the result panel has for some sort of visual cue
  • All of the options described here. Please note that everything here under [run] section goes to [tool.ward.plugins.coverage] and other sections need their separate block (e.g [tool.ward.plugins.coverage.report]) or dictionary entry within the [tool.ward.plugins.coverage] section in toml.

Example configuration

[tool.ward.plugins.coverage]
omit = ["*test*", "example.py", "**/__init__.py"]
report_type = ["term", "xml"]
source = ["."]
branch = true
relative_files = true
report = {skip_empty = true}

Contributors, issues and feature requests are welcome.

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

ward_coverage-0.3.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

ward_coverage-0.3.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file ward_coverage-0.3.1.tar.gz.

File metadata

  • Download URL: ward_coverage-0.3.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for ward_coverage-0.3.1.tar.gz
Algorithm Hash digest
SHA256 89676ca687eba25d9ece2adcd0eefe18045e1567a9886a9796bf088a01f5cc4d
MD5 7ba2f7c1b8e6723b3adb6d8bd2ab7123
BLAKE2b-256 b275cba3e93c0a1bd685f21d3e5acd005e2614da97327e608efb663b3736a75b

See more details on using hashes here.

File details

Details for the file ward_coverage-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: ward_coverage-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for ward_coverage-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0fa51610a8c44b1a40b767fc85a04ddf2beb1d7a725f34e1ebcdbac31a731e18
MD5 39c8930282abcccf70debe1c59aa90cf
BLAKE2b-256 8f89834e0b8d27e9db0f1e8302600f78b436ade05a0cc7be1b2a9576c552582b

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