Skip to main content

coverwise

PyPI npm License

Combinatorial test coverage for Python. The coverwise package ships the native C++ CLI plus a Python API that generates, analyzes, and incrementally extends t-wise test suites — including a pytest decorator that replaces a hand-written cross-product with a covering suite.

Installation

pip install coverwise

Supported wheels: Linux x86_64, Linux aarch64, and macOS 14+ Apple Silicon. The package ships a prebuilt executable rather than portable Python code, so other platforms have to build the CLI from source. There are no Python runtime dependencies, and the coverwise command is installed directly.

Quick Start

import coverwise

result = coverwise.generate(
    parameters={
        "os": ["Linux", "macOS", "Windows"],
        "browser": ["Chrome", "Firefox", "Safari"],
    },
    constraints=["IF os = Windows THEN browser != Safari"],
    strength=2,
)

result["coverage"]  # 1
result["tests"]     # [{"os": "Linux", "browser": "Firefox"}, ...]

Every function takes and returns plain dictionaries — the same JSON the CLI reads and writes:

Function Purpose
generate(model, **fields) Generate a covering suite
analyze_coverage(parameters, tests, strength, constraints) Measure an existing suite
extend_tests(existing, model, **fields) Extend a suite, keeping existing tests
estimate_model(model, **fields) Model size and validity, without generating

Invalid models and unparsable constraints raise coverwise.CoverwiseError, carrying code, exit_code, and the CLI's stderr.

pytest

coverwise.parametrize runs a test once per generated case, passing each parameter as a same-named argument:

import coverwise

@coverwise.parametrize(
    {
        "os": ["Windows", "macOS", "Linux"],
        "browser": ["Chrome", "Firefox", "Safari"],
        "locale": ["en", "ja"],
    },
    constraints=["IF os = Windows THEN browser != Safari"],
)
def test_login(os, browser, locale):
    assert login(os, browser, locale).ok

The full cross-product is 18 cases; the pairwise suite covers every pair in far fewer. pytest is not a dependency of this package — the decorator only needs it where tests run, and pip install coverwise[pytest] installs both together.

Command Line

coverwise generate input.json > tests.json
coverwise analyze --params input.json --tests tests.json
coverwise extend --existing tests.json input.json > updated.json
coverwise stats input.json

Any input path may be - to read that JSON from standard input. python -m coverwise is equivalent to the installed command, and coverwise --help lists every command with its exit-code contract.

See the Python API reference, the CLI reference, and the full project documentation.

For AI coding agents

coverwise-mcp exposes the same engine as an MCP server, so a coding agent writing tests for a function with several parameters builds a parameter model instead of picking combinations by eye. It installs as a Claude Code plugin and also runs under any MCP client, including Codex CLI, Cursor and Claude Desktop.

License

Apache-2.0

Metadata

Release files for coverwise 1.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for coverwise 1.6.4
File Interpreter ABI Platform Actions
coverwise-1.6.4-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for coverwise-1.6.4-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
coverwise-1.6.4-py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details for coverwise-1.6.4-py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
coverwise-1.6.4-py3-none-macosx_14_0_arm64.whl Python 3 none macOS 14.0+ ARM64 Details for coverwise-1.6.4-py3-none-macosx_14_0_arm64.whl

Total release size: 1.2 MB

Release files / coverwise-1.6.4-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL coverwise-1.6.4-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 511.9 kB
Tags Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
74205e126ab1e6e39acc500351ddc6db1091111f39f0952d1105031222426321
BLAKE2b-256 checksum
How to use checksums
44ed67880dc4c4cafe20dfb332acadc316cb17eb50f27c3fa9dc9c1ab12f09fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / coverwise-1.6.4-py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL coverwise-1.6.4-py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 446.5 kB
Tags Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
e42d8c50a49e948b9e55a208a04429b9d0928eda7ccfbcb3362ddb18dd803cdb
BLAKE2b-256 checksum
How to use checksums
873729ebf4f8ceedc31eea05db999f2ff21e7c3e2b2c380589e313c5a8c8362d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / coverwise-1.6.4-py3-none-macosx_14_0_arm64.whl

Download URL coverwise-1.6.4-py3-none-macosx_14_0_arm64.whl
Size 218.5 kB
Tags Python 3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
7fd70397ba75cb38cdce59d12e8f245acee7cd99a288305236bc1fd4501c0a30
BLAKE2b-256 checksum
How to use checksums
4ea2899298e327595a098c0e087925112e4402a24c8037b9f6368ddce2e4f6e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for coverwise 1.6.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 3 files in this release have been uploaded with provenance metadata.

Select from 3 files

Attestation for coverwise-1.6.4-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page