$npx skillfedfor your agent

coverage-conditional-plugin

Conditional coverage based on any rules you define!

With conditionsPyPI Python ModulesReleased Jun 2023169.1K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — coverage_conditional_plugin-0.9.0-py3-none-any.whl
v0.9.0 · released 2023-06-02 · Python >=3.7,<4.0 · 3 runtime deps: coverage, packaging, importlib_metadata

Yes, if you maintain a multi-environment test suite (different Python versions, OSes, or optional dependencies) and want accurate coverage reporting across all of them. The low install friction and permissive license make adoption straightforward. However, the dormant maintenance status (last release June 2023, no recent commits) means you should verify compatibility with your current coverage.py and Python versions before relying on it in production CI—consider forking or monitoring the upstream repository if you need active support.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires coverage to be installed and configured in your project; the plugin integrates via coverage.py's plugin system and must be declared in setup.cfg, .coveragerc, or pyproject.toml.
  • Low install friction; pure Python wheel with three straightforward runtime dependencies (coverage, packaging, importlib_metadata).
  • Maintenance is dormant—last release was 2023-06-02 and no commits since 2025-01-03—so expect no active bug fixes or feature updates, though the codebase appears stable.

License · maintenance · safety

MIT (permissive) — MIT license (permissive) means you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions, provided you retain the license notice.

last release 2023-06-02 (1169 days) · last repo commit 2025-01-03 · 80 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 169,080 downloads/mo, #10,429 on PyPI

Verify before relying

pip install coverage-conditional-plugin

# In setup.cfg or .coveragerc:
[coverage:run]
plugins = coverage_conditional_plugin

[coverage:coverage_conditional_plugin]
rules =
  "sys_version_info >= (3, 8)": py-gte-38
  "is_installed('django')": has-django

# In your code:
# pragma: py-gte-38
some_code_for_python_38_plus()

# pragma: has-django
django_specific_code()
  • Whether the plugin works correctly with all coverage.py versions currently in use (fact sheet does not specify coverage version constraints).
  • Performance impact when evaluating many conditional rules across a large codebase.
  • Whether dormant maintenance status affects compatibility with recent Python or coverage.py releases.
Same gist for agents: .md · .json

What it is and what it does

coverage-conditional-plugin extends coverage.py to mark code as covered or uncovered based on runtime conditions rather than static pragmas. Instead of using `# pragma: no cover` for code that only runs on certain Python versions, operating systems, or when specific packages are installed, you define named rules (e.g., `"sys_version_info >= (3, 8)": py-gte-38`) in your coverage configuration, then annotate code with `# pragma: py-gte-38`. The plugin evaluates the condition at test time and includes or excludes that code from coverage accordingly.

It supports environment markers from PEP 496 (Python version, OS, platform), custom functions like `is_installed()` to check for optional dependencies, and `package_version()` to version-gate code. You can also conditionally omit entire files based on conditions. This is useful for projects with platform-specific code, version-specific features, or optional dependencies—you can achieve 100% coverage in multiple test environments without littering your code with unconditional pragmas.

Use it for

  • Mark Windows-only or Linux-only code blocks so they are only counted as covered when tests run on that platform.
  • Exclude code that only executes on Python 3.7 from coverage when testing on Python 3.10+, and vice versa.
  • Include or exclude optional-dependency code (e.g., Django integration) based on whether the package is installed in the test environment.
  • Achieve 100% coverage across multiple CI jobs that test different Python versions or OS combinations without false negatives.
  • Version-gate code paths so that code for a deprecated feature version is only measured when that version is present.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you maintain a multi-environment test suite (different Python versions, OSes, or optional dependencies) and want accurate coverage reporting across all of them.

The low install friction and permissive license make adoption straightforward. However, the dormant maintenance status (last release June 2023, no recent commits) means you should verify compatibility with your current coverage.py and Python versions before relying on it in production CI—consider forking or monitoring the upstream repository if you need active support.

Install

coverage-conditional-plugin on PyPI

Before you install

Low install friction; pure Python wheel with three straightforward runtime dependencies (coverage, packaging, importlib_metadata). Maintenance is dormant—last release was 2023-06-02 and no commits since 2025-01-03—so expect no active bug fixes or feature updates, though the codebase appears stable.

Requires coverage to be installed and configured in your project; the plugin integrates via coverage.py's plugin system and must be declared in setup.cfg, .coveragerc, or pyproject.toml.

License in practice

MIT license (permissive) means you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions, provided you retain the license notice.

Quickstart

pip install coverage-conditional-plugin

# In setup.cfg or .coveragerc:
[coverage:run]
plugins = coverage_conditional_plugin

[coverage:coverage_conditional_plugin]
rules =
  "sys_version_info >= (3, 8)": py-gte-38
  "is_installed('django')": has-django

# In your code:
# pragma: py-gte-38
some_code_for_python_38_plus()

# pragma: has-django
django_specific_code()

Verify before relying

  • Whether the plugin works correctly with all coverage.py versions currently in use (fact sheet does not specify coverage version constraints).
  • Performance impact when evaluating many conditional rules across a large codebase.
  • Whether dormant maintenance status affects compatibility with recent Python or coverage.py releases.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.7,<4.0
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
coveragepackagingimportlib_metadata
MaintenanceDormant 1,169 days since the last release
Last repo commit
First released
Downloads169,080 / month, #10,429 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Evidence: coverage_conditional_plugin-0.9.0-py3-none-any.whl

Tags

Capabilities
coverage.py plugin conditionalenvironment-based coverage exclusionpragma coverage rulespython version coverageconditional code coveragecoverage based on environment markersdynamic coverage omit
Topics
coverage-measurementtesting-infrastructuremulti-environment
PyPI keywords
coveragecoverage.pypytest-covtesting

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “coverage.py plugin conditional”

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also conditional · covdefaults · update_checker · django-coverage-plugin · coverage_enable_subprocess · coverage · pytest-skip-markers · pytest-enabler · pytest-cover · mypy-strict-kwargs