pytest-helpers-namespace
Pytest Helpers Namespace Plugin
What it is and what it does
pytest-helpers-namespace is a pytest plugin that creates a shared namespace accessible via pytest.helpers, allowing you to register helper functions in conftest.py and call them directly from test files without importing them. This reduces boilerplate in test files and centralizes helper definitions. The plugin supports nested namespaces, so you can organize helpers hierarchically (e.g., pytest.helpers.can.haz.foo).
The package depends only on pytest and installs with low friction. However, it has been abandoned since late 2022 with no active maintenance. The last release was 2021-12-29, meaning it may not be tested or compatible with recent pytest versions or Python releases beyond those listed in its classifiers.
Use it for:
- Centralize test utilities in conftest.py and access them via pytest.helpers without import statements in every test file.
- Organize related helper functions into nested namespaces (e.g., pytest.helpers.database.connect) for better code structure.
- Share common test setup functions across a large test suite without polluting the global namespace or test file imports.
- Reduce test file boilerplate by making frequently used helper functions available through a single pytest.helpers entry point.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a pytest namespace for registering and accessing helper functions in conftest.py without explicit imports in test files.
Yes, if you are using an older pytest version and your test suite is stable. The plugin is simple, has no external dependencies beyond pytest, and solves a real organizational problem. However, do not use it in new projects or if you need active maintenance—the package is abandoned and may break with future pytest releases. Consider alternatives or inline helpers in conftest.py for new work.
Install
pytest-helpers-namespace on PyPI
pip
pip install pytest-helpers-namespaceuv
uv add pytest-helpers-namespacepoetry
poetry add pytest-helpers-namespaceInstalling pytest-helpers-namespace
Before you install
Low friction install with a single runtime dependency (pytest). However, the package is abandoned—last release was 2021-12-29 and last commit 2022-10-10. No active maintenance means bugs or compatibility issues with newer pytest versions will not be addressed.
License in practice
Licensed under Apache Software License 2.0, a permissive open-source license. You may use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
Quickstart
pip install pytest-helpers-namespace
# In conftest.py:
import pytest
@pytest.helpers.register
def my_helper(value):
return value
# In test file:
def test_example():
assert pytest.helpers.my_helper(True) is True
Verify before relying
- Compatibility with pytest versions released after 2022-10-10 is unknown and untested.
- Whether nested helper namespaces (pytest.helpers.can.haz) work reliably with current pytest is unverified.
Package facts
| License | Apache Software License 2.0 (permissive) |
| Python support | supports the current Python release (>=3.5.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pytest |
| Maintenance | abandoned — 1,689 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 230,571/month — #9,105 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_helpers_namespace-2021.12.29-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-datafilesA pytest plugin that copies specified files and…
permissive · top 15,000 on PyPI
pytest-loggingA pytest plugin that configures Python logging…
permissive · top 15,000 on PyPI
pytest-socketA pytest plugin that blocks or restricts socket…
permissive · top 5,000 on PyPI
pytest-xmlA pytest plugin that generates XML output from…
unclear · top 15,000 on PyPI
pytest-cythonA pytest plugin that runs doctests embedded in…
unclear · top 15,000 on PyPI
pytest-find-dependenciesA pytest plugin that identifies dependencies…
permissive · top 5,000 on PyPI
pytest-error-for-skipsA pytest plugin that converts skipped tests…
permissive · top 15,000 on PyPI
apipkgapipkg lets you define a package's exported…
permissive · top 5,000 on PyPI
pytest-variablesA pytest plugin that loads test variables from…
copyleft · top 15,000 on PyPI
pytest-astropy-headerA pytest plugin that automatically includes…
permissive · top 15,000 on PyPI