pytest-runner
Invoke py.test as distutils command with dependency resolution
Decision gist · record as of 2026-08-14
No. The package is abandoned (last release 2023-12-04, repository archived) and explicitly deprecated by its maintainers. Do not add it to new projects. If you maintain an existing project using pytest-runner, migrate to tox or another modern test runner and remove pytest-runner from setup_requires and tests_require. The security and compatibility risks of relying on deprecated setuptools features outweigh any convenience from the setup.py integration.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.7; deprecated setuptools features (setup_requires, tests_require) may not work with future setuptools versions.
- Installation is frictionless with no runtime dependencies, but the package is abandoned as of 2023-12-04 and explicitly marked inactive.
- The maintainers recommend migrating away to alternatives like tox.
License · maintenance · safety
permissive license (permissive) — Licensed under MIT (permissive), so there are no licensing restrictions on use or redistribution.
last release 2023-12-04 (984 days) · last repo commit 2023-12-04 · 56 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 26,625,278 downloads/mo, #875 on PyPI
Alternatives
Verify before relying
pip install pytest-runner
In setup.py:
setup(
setup_requires=['pytest-runner'],
tests_require=['pytest'],
)
Then run: python setup.py pytest- Whether existing projects still using pytest-runner will continue to work with current setuptools versions without breaking changes.
- What specific security mechanisms in pip are bypassed by setup_requires and tests_require, and whether this poses a risk in your use case.
What it is and what it does
pytest-runner is a setuptools plugin that allows you to invoke pytest tests by running `python setup.py pytest` instead of calling pytest directly. It was designed to integrate pytest into the standard distutils/setuptools workflow, automatically resolving and installing test dependencies before running the test suite.
The package is now deprecated and abandoned. Its core problem—bridging pytest and setuptools—has been superseded by modern Python packaging practices. The maintainers explicitly warn that pytest-runner depends on deprecated setuptools features (setup_requires, tests_require) that bypass pip's security mechanisms like --require-hashes. Projects using it are advised to migrate to dedicated test runners like tox, which handle test orchestration and dependency management independently of setup.py.
Use it for
- Running tests in legacy projects that still use setup.py test as their primary test invocation method.
- Standalone test scripts that need to download and run pytest with dependencies on systems without a test runner pre-installed.
- Projects that cannot yet migrate away from setup.py-based workflows due to CI/CD constraints or organizational requirements.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The package is abandoned (last release 2023-12-04, repository archived) and explicitly deprecated by its maintainers. Do not add it to new projects. If you maintain an existing project using pytest-runner, migrate to tox or another modern test runner and remove pytest-runner from setup_requires and tests_require. The security and compatibility risks of relying on deprecated setuptools features outweigh any convenience from the setup.py integration.
Install
pytest-runner on PyPI
Before you install
Installation is frictionless with no runtime dependencies, but the package is abandoned as of 2023-12-04 and explicitly marked inactive. The maintainers recommend migrating away to alternatives like tox.
Requires Python >=3.7; deprecated setuptools features (setup_requires, tests_require) may not work with future setuptools versions.
License in practice
Licensed under MIT (permissive), so there are no licensing restrictions on use or redistribution.
Quickstart
pip install pytest-runner
In setup.py:
setup(
setup_requires=['pytest-runner'],
tests_require=['pytest'],
)
Then run: python setup.py pytest
Verify before relying
- Whether existing projects still using pytest-runner will continue to work with current setuptools versions without breaking changes.
- What specific security mechanisms in pip are bypassed by setup_requires and tests_require, and whether this poses a risk in your use case.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 984 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 26,625,278 / month, #875 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 7 - InactiveFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: Only |
Evidence: pytest_runner-6.0.1-py3-none-any.whl
Tags
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 › “setup.py pytest integration”
- pytest-runnerEnables running pytest tests through setup.py by integrating pytest…
- lib-detect-testenvDetects whether code is running in a test environment (pytest,…
- pytest-console-scriptsA pytest plugin that runs Python console scripts within tests,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also pytest-django · pytest-enabler · riot · pytest-watch · pytest-pspec · ipytest · pytest-html-reporter · setuptools · pytest-pep8