pytest-enabler
Enable installed pytest plugins
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-enableruv
uv add pytest-enablerpoetry
poetry add pytest-enablerInstalling 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
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
pytest-blackA pytest plugin that runs black format checks…
permissive · top 15,000 on PyPI
coverage-conditional-pluginA coverage.py plugin that applies conditional…
permissive · top 15,000 on PyPI
pytest-onlyA pytest plugin that runs only tests marked…
permissive · top 15,000 on PyPI
pytest-runnerEnables running pytest tests through setup.py…
permissive · top 1,000 on PyPI
pytest-skip-markersA pytest plugin that provides skip markers to…
permissive · top 15,000 on PyPI
conditionalConditionally apply a context manager to a code…
permissive · top 15,000 on PyPI
pytest-mypyIntegrates mypy static type checking into…
permissive · top 15,000 on PyPI
pytest-socketA pytest plugin that blocks or restricts socket…
permissive · top 5,000 on PyPI
pytest-hot-reloadingA pytest plugin that runs a daemon to watch and…
unclear · top 15,000 on PyPI
logfire-apilogfire-api provides a no-op shim of the…
permissive · top 1,000 on PyPI