skillfed

pytest-integration

Organizing pytests by integration or not

pytest-integration v0.2.3 273.4K downloads/30d#8,200 on PyPI25
Permissive license Abandoned released

What it is and what it does

pytest-integration is a pytest plugin that adds markers and command-line options to organize tests into three tiers: unit tests, integration tests, and slow integration tests. It enforces a sequential execution order—unit tests run first, then integration tests only if all units pass, then slow integration tests only if integration tests pass. This prevents wasting time on expensive integration tests when the codebase has basic failures. If pytest-cov is installed, the plugin automatically disables coverage reporting for integration tests, since unit tests are expected to provide full coverage.

The plugin adds two markers (`@pytest.mark.integration_test` and `@pytest.mark.slow_integration_test`) and three command-line flags (`--with-integration`, `--with-slow-integration`, and `--integration-cover`) to control which tiers run and whether integration tests contribute to coverage. It has no runtime dependencies beyond pytest itself, making it lightweight to add to an existing test suite.

Use it for:

  • Separate unit tests from integration tests in a CI/CD pipeline to fail fast on logic errors before running expensive external-service tests.
  • Mark database or API tests as slow integration tests to run them last, only when quick tests pass.
  • Disable coverage collection for integration tests to keep coverage reports focused on unit-test coverage.
  • Organize a large test suite where some tests require external services or take significant time to run.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A pytest plugin that organizes tests into unit, integration, and slow integration tiers, running them sequentially and skipping later tiers if earlier ones fail.

Yes, if you have an existing pytest suite and want to organize tests by tier with minimal setup. No, if you need active maintenance or support for the latest pytest features—the package is abandoned and has not been updated since 2023. Consider it stable for simple use cases but risky for projects that upgrade pytest frequently or need ongoing compatibility fixes.

Install

pytest-integration on PyPI

pip

pip install pytest-integration

uv

uv add pytest-integration

poetry

poetry add pytest-integration

Installing pytest-integration

Before you install

Low friction installation with no runtime dependencies. However, the package is abandoned—last release was 1366 days ago with no commits since 2023-04-07. It still supports current Python versions but receives no maintenance.

License in practice

MIT license (permissive) places no restrictions on use, modification, or distribution.

Quickstart

pip install pytest-integration

# In your test file:
import pytest

@pytest.mark.integration_test
def test_api_call():
    pass

@pytest.mark.slow_integration_test
def test_database_sync():
    pass

# Run with: pytest --with-integration --with-slow-integration

Requires pytest to be installed; designed for Python 3.6+.

Verify before relying

  • Whether the plugin works reliably with recent pytest versions (last tested in 2023).
  • Compatibility with modern pytest-cov versions and whether coverage exclusion still functions as documented.
  • Behavior under xdist with current pytest-xdist releases and whether the documented limitation still applies.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 1,366 days since the last release
Last repo commit
First released
Downloads 273,440/month — #8,200 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pytest_integration-0.2.3-py3-none-any.whl

Framework :: PytestLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

pytest integration test markersorganize pytest by test typeskip integration tests on unit failurepytest test ordering pluginslow integration test runner
test-organizationabandoned-but-stable

More Testing packages