pytest-depends
Tests that depend on other tests
What it is and what it does
pytest-depends is a pytest plugin that lets you declare which tests depend on other tests passing, automatically skipping dependent tests if their prerequisites fail. Rather than treating tests as independent units, it recognizes scenarios where running a test makes no sense if an earlier test failed—for instance, if a build artifact doesn't exist, there's no point testing its version. The plugin reorders tests to run dependencies first and marks dependent tests as skipped if their prerequisites don't succeed.
The package depends on pytest, colorama, networkx, and future-fstrings. You declare dependencies using pytest markers with custom names or auto-generated test identifiers, and the plugin handles the rest.
Use it for:
- Skip integration tests when a prerequisite setup test fails, avoiding cascading failures in slow test suites
- Avoid running tests on a build artifact when an earlier test confirms the artifact doesn't exist
- Reduce test runtime by skipping tests that cannot possibly pass given earlier failures
- Organize test execution around logical prerequisites without duplicating setup logic
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pytest plugin that lets you declare dependencies between tests, skipping dependent tests if their prerequisites fail.
No. The package is abandoned (last release 2020-04-05, no recent commits), and compatibility with modern pytest and Python versions is unverified. While the concept is useful for specific scenarios, the lack of maintenance and unknown breakage risk make it unsuitable for new projects.
Install
pytest-depends on PyPI
pip
pip install pytest-dependsuv
uv add pytest-dependspoetry
poetry add pytest-dependsInstalling pytest-depends
Before you install
Low install friction with a pure-Python wheel. However, the package is abandoned—last release was 2020-04-05 with no recent maintenance.
License in practice
MIT license (permissive). You can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install pytest-depends
import pytest
@pytest.mark.depends(on=['test_build_exists'])
def test_build_version():
pass
Verify before relying
- Whether the plugin remains compatible with current pytest versions given the 2020 release date
- Whether test reordering conflicts with modern pytest plugins remain unresolved
- Compatibility with Python versions beyond 3.8 listed in classifiers
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — colorama, future-fstrings, networkx, pytest |
| Maintenance | abandoned — 2,322 days since the last release |
| First released | |
| Downloads | 155,474/month — #10,813 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_depends-1.0.1-py3-none-any.whl
Keywords: pytest
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-dependencyA pytest plugin that marks tests as dependent…
permissive · top 5,000 on PyPI
pytest-skip-markersA pytest plugin that provides skip markers to…
permissive · top 15,000 on PyPI
pytest-reverseA pytest plugin that runs tests in reverse…
permissive · top 15,000 on PyPI
pytest-loopA pytest plugin that repeats tests a fixed…
copyleft · top 15,000 on PyPI
pytest-repeatA pytest plugin that repeats test execution a…
copyleft · top 5,000 on PyPI
robotframework-dependencylibraryDeclares and enforces dependencies between…
permissive · top 15,000 on PyPI
pytest-find-dependenciesA pytest plugin that identifies dependencies…
permissive · top 5,000 on PyPI
pytest-subprocessPytest plugin that intercepts and fakes…
permissive · top 15,000 on PyPI
pytest-loggerPytest-logger is a pytest plugin that…
permissive · top 15,000 on PyPI
pytest-randomlyA pytest plugin that randomly shuffles test…
permissive · top 5,000 on PyPI