skillfed

pytest-enabler

Enable installed pytest plugins

pytest-enabler v3.4.0 90.9K downloads/30d#13,559 on PyPI6
Permissive license MIT Active released

What it is and what it does

pytest-enabler is a pytest plugin that lets you configure other pytest plugins in a way that gracefully handles their absence. Instead of failing when an optional plugin isn't installed, enabler simply skips its configuration. You define plugin settings in your pyproject.toml under [tool.pytest-enabler.*] sections, and enabler activates them only if those plugins are present.

The plugin comes with a default configuration covering common pytest extensions like pytest-black, pytest-cov, pytest-flake8, pytest-mypy, pytest-ruff, pytest-xdist, and pytest-ignore-flaky. You can override or extend these defaults in your own config, and you can still disable any plugin at runtime using pytest's standard -p no:plugin_name flag.

Use it for:

  • Set up a shared pytest configuration that works across teams without requiring everyone to install the same optional plugins
  • Gradually roll out new pytest plugins (like code formatters or type checkers) without breaking existing test runs
  • Maintain a single pyproject.toml that defines plugin behavior for developers who have different plugin suites installed
  • Reduce boilerplate by letting enabler handle plugin discovery and conditional activation instead of manual pytest.ini tweaking

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A pytest plugin that conditionally enables other pytest plugins based on configuration, activating them only if they are installed.

Yes. If you use pytest and manage optional plugins (formatters, linters, type checkers), enabler eliminates configuration friction by letting you define plugin settings that only apply when those plugins are installed. Low install friction, active maintenance, MIT license, and no known vulnerabilities make it a safe addition to any pytest workflow.

Install

pytest-enabler on PyPI

pip

pip install pytest-enabler

uv

uv add pytest-enabler

poetry

poetry add pytest-enabler

Installing pytest-enabler

Before you install

Low install friction with four lightweight runtime dependencies (toml, jaraco.functools, jaraco.context, importlib_resources). Actively maintained with a recent commit on 2026-04-13 and marked as Production/Stable.

License in practice

MIT license permits commercial and private use with minimal restrictions, making it safe to adopt in any project.

Quickstart

pip install pytest-enabler

# Add to pyproject.toml:
# [tool.pytest-enabler.black]
# addopts = "--black"

# Then run:
pytest

Requires Python 3.9 or later.

Verify before relying

  • Whether the default config covers all common pytest plugins or requires manual setup for less common ones
  • Performance impact when many plugins are conditionally enabled

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 4 — toml, jaraco.functools, jaraco.context, importlib_resources
Maintenance actively maintained — 455 days since the last release
Last repo commit
First released
Downloads 90,868/month — #13,559 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pytest_enabler-3.4.0-py3-none-any.whl

Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: Only

Tags

pytest plugin configurationconditional pytest pluginsenable pytest plugins dynamicallypytest plugin managementpytest optional plugins
pytest-plugintest-configuration

More Testing packages

pluggy

Pluggy provides a plugin system that lets you…

permissive · top 100 on PyPI

pytest

pytest is a testing framework that lets you…

permissive · top 100 on PyPI

virtualenv

virtualenv creates isolated Python environments…

permissive · top 100 on PyPI

coverage

Coverage.py measures which lines of Python code…

permissive · top 1,000 on PyPI

pytest-asyncio

pytest-asyncio is a pytest plugin that enables…

permissive · top 1,000 on PyPI

pytest-json-ctrf

A pytest plugin that generates test reports in…

permissive · top 1,000 on PyPI

pytest-black

A pytest plugin that runs black format checks…

permissive · top 15,000 on PyPI

coverage-conditional-plugin

A coverage.py plugin that applies conditional…

permissive · top 15,000 on PyPI

pytest-only

A pytest plugin that runs only tests marked…

permissive · top 15,000 on PyPI

pytest-runner

Enables running pytest tests through setup.py…

permissive · top 1,000 on PyPI

pytest-skip-markers

A pytest plugin that provides skip markers to…

permissive · top 15,000 on PyPI

conditional

Conditionally apply a context manager to a code…

permissive · top 15,000 on PyPI

pytest-mypy

Integrates mypy static type checking into…

permissive · top 15,000 on PyPI

pytest-socket

A pytest plugin that blocks or restricts socket…

permissive · top 5,000 on PyPI

pytest-hot-reloading

A pytest plugin that runs a daemon to watch and…

unclear · top 15,000 on PyPI

logfire-api

logfire-api provides a no-op shim of the…

permissive · top 1,000 on PyPI