pytest-dependency
Manage dependencies of tests
Decision gist · record as of 2026-08-14
Yes, if you have a test suite with explicit dependencies between tests. The plugin is actively maintained, has no external runtime dependencies, and carries a permissive license. The high install friction is a minor concern; verify whether it affects your environment. For simple test suites without inter-test dependencies, it adds no value.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires pytest to be installed; pytest-dependency is a plugin and will not function standalone.
- High install friction with no runtime dependencies.
- The package itself is a pytest plugin with zero external runtime requirements, but the friction rating suggests potential build or environment setup complexity during installation.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache License 2.0 (permissive). You may use, modify, and distribute this package freely in commercial and private projects, provided you include a copy of the license and state any material changes.
last release 2026-02-15 (180 days) · last repo commit 2026-02-15 · 172 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 8,908,309 downloads/mo, #1,579 on PyPI
Alternatives
Verify before relying
pip install pytest-dependency
# In your test file:
import pytest
@pytest.mark.dependency()
def test_setup():
pass
@pytest.mark.dependency(depends_on=['test_setup'])
def test_dependent():
pass- Whether the high install friction stems from compiled dependencies, system libraries, or other environmental factors not evident from the package metadata.
- Current maintenance activity level beyond the last commit date (2026-02-15) and whether active development continues.
What it is and what it does
pytest-dependency is a pytest plugin that lets you declare test dependencies—marking some tests as dependent on the success of other tests. When a test is marked as dependent on another, it will be automatically skipped if any of its dependencies fail or are themselves skipped. This is useful for test suites where later tests logically depend on earlier setup or validation steps succeeding.
The plugin integrates directly into pytest's test collection and execution flow. It has no external runtime dependencies and supports Python versions from 3.4 through 3.14. The package is actively maintained, with a recent commit history and a permissive Apache 2.0 license that allows both commercial and private use.
Use it for
- Skip integration tests when their setup fixture test fails, avoiding cascading false failures.
- Manage test suites where database migration tests must pass before data validation tests run.
- Conditionally run cleanup or teardown tests only if their corresponding setup tests succeeded.
- Build test pipelines where later stages depend on earlier stages completing successfully.
- Reduce test noise by skipping dependent tests rather than letting them fail due to unmet preconditions.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you have a test suite with explicit dependencies between tests.
The plugin is actively maintained, has no external runtime dependencies, and carries a permissive license. The high install friction is a minor concern; verify whether it affects your environment. For simple test suites without inter-test dependencies, it adds no value.
Install
pytest-dependency on PyPI
Before you install
High install friction with no runtime dependencies. The package itself is a pytest plugin with zero external runtime requirements, but the friction rating suggests potential build or environment setup complexity during installation.
Requires pytest to be installed; pytest-dependency is a plugin and will not function standalone.
License in practice
Licensed under Apache License 2.0 (permissive). You may use, modify, and distribute this package freely in commercial and private projects, provided you include a copy of the license and state any material changes.
Quickstart
pip install pytest-dependency
# In your test file:
import pytest
@pytest.mark.dependency()
def test_setup():
pass
@pytest.mark.dependency(depends_on=['test_setup'])
def test_dependent():
pass
Verify before relying
- Whether the high install friction stems from compiled dependencies, system libraries, or other environmental factors not evident from the package metadata.
- Current maintenance activity level beyond the last commit date (2026-02-15) and whether active development continues.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.4 |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Actively maintained 180 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 8,908,309 / month, #1,579 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Testing |
Evidence: pytest_dependency-0.6.1.tar.gz
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 › “skip tests based on other tests”
- pytest-dependencyA pytest plugin that marks tests as dependent on other tests,…
- pytest-dependsA pytest plugin that lets you declare dependencies between tests,…
- pytest-skip-markersA pytest plugin that provides skip markers to conditionally skip…
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-depends · pytest-skip-markers · pytest-remotedata · pytest-fixture-config · pytest-integration · pytest-only · pytest-find-dependencies · pytest-order · pytest-jira · pytest-error-for-skips