skillfed

pytest-depends

Tests that depend on other tests

pytest-depends v1.0.1 155.5K downloads/30d#10,813 on PyPI
Permissive license MIT Abandoned released

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-depends

uv

uv add pytest-depends

poetry

poetry add pytest-depends

Installing 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

Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Testing

Tags

pytest test dependenciesskip tests based on other testspytest conditional test executiontest ordering by dependenciespytest test prerequisites
test-orchestrationabandoned

More Testing packages

pluggy

Pluggy provides a plugin system that lets you…

permissive · top 100 on PyPI

pytest

pytest is a testing framework that lets you…

permissive · top 100 on PyPI

virtualenv

virtualenv creates isolated Python environments…

permissive · top 100 on PyPI

coverage

Coverage.py measures which lines of Python code…

permissive · top 1,000 on PyPI

pytest-asyncio

pytest-asyncio is a pytest plugin that enables…

permissive · top 1,000 on PyPI

pytest-json-ctrf

A pytest plugin that generates test reports in…

permissive · top 1,000 on PyPI

pytest-dependency

A pytest plugin that marks tests as dependent…

permissive · top 5,000 on PyPI

pytest-skip-markers

A pytest plugin that provides skip markers to…

permissive · top 15,000 on PyPI

pytest-reverse

A pytest plugin that runs tests in reverse…

permissive · top 15,000 on PyPI

pytest-loop

A pytest plugin that repeats tests a fixed…

copyleft · top 15,000 on PyPI

pytest-repeat

A pytest plugin that repeats test execution a…

copyleft · top 5,000 on PyPI

robotframework-dependencylibrary

Declares and enforces dependencies between…

permissive · top 15,000 on PyPI

pytest-find-dependencies

A pytest plugin that identifies dependencies…

permissive · top 5,000 on PyPI

pytest-subprocess

Pytest plugin that intercepts and fakes…

permissive · top 15,000 on PyPI

pytest-logger

Pytest-logger is a pytest plugin that…

permissive · top 15,000 on PyPI

pytest-randomly

A pytest plugin that randomly shuffles test…

permissive · top 5,000 on PyPI