$npx skillfedfor your agent

pytest-docker-tools

Docker integration tests for pytest

Worth itPyPI TestingReleased Jul 20261.7M downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_docker_tools-3.1.10-py2.py3-none-any.whl
v3.1.10 · released 2026-07-21 · Python <4.0.0,>=3.9.0 · 2 runtime deps: pytest, docker

Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem—eliminating boilerplate for Docker-based testing. It's well-suited for teams running integration or smoke tests against containerized services. The permissive Apache-2.0 license poses no restriction. Install it if you're writing tests that need Docker containers.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Docker daemon running and accessible; pytest must be installed.
  • Low friction: pure Python wheel with only pytest and docker as runtime dependencies.
  • Active maintenance with a release 24 days ago; repository shows 102 stars and no archived status.

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 is permissive; you can use this in commercial projects and modify it freely, with minimal restrictions beyond preserving license notices.

last release 2026-07-21 (24 days) · last repo commit 2026-07-21 · 102 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,737,976 downloads/mo, #3,603 on PyPI

Verify before relying

pip install pytest-docker-tools

# In conftest.py
from pytest_docker_tools import container, fetch

my_image = fetch(repository='redis:latest')
my_container = container(image='{my_image.id}', ports={'11211/tcp': None})

# In test_example.py
def test_redis(my_container):
    port = my_container.ports['11211/tcp'][0]
    # connect and test
  • Whether fixture scopes (session, module, function) work as documented with pytest-xdist parallelism.
  • Performance characteristics when managing many concurrent containers under xdist.
  • Compatibility with Docker Desktop vs. other Docker installations.
Same gist for agents: .md · .json

What it is and what it does

pytest-docker-tools is a fixture factory library that lets you define Docker-based test environments declaratively in pytest, similar to docker-compose.yml syntax. Instead of writing boilerplate code to spin up containers for each test, you define fixtures once in conftest.py and inject them into tests; the library handles creation, teardown, and dependency resolution automatically. It supports fixture scoping (session, module, function), automatic port mapping, environment variable injection, and container restart operations.

The library is built on pytest and docker as its only runtime dependencies, making installation straightforward. It's designed for smoke testing Docker images and integration testing microservices, with explicit support for parallel test execution via pytest-xdist. Fixtures can be overridden per test module, and the library captures Docker logs on test failure for debugging.

Use it for

  • Smoke-test a freshly built Docker image before release to verify it starts and responds correctly.
  • Integration test a microservice by spinning up dependent containers (database, cache, mock DNS) per test with automatic cleanup.
  • Run parallel integration tests across multiple CPU cores using pytest-xdist, with automatic port and resource name collision avoidance.
  • Reuse long-lived containers (session scope) across multiple test modules while recreating module-scoped resources between modules.
  • Test container restart behavior and recovery without manual container lifecycle management in test code.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem—eliminating boilerplate for Docker-based testing. It's well-suited for teams running integration or smoke tests against containerized services. The permissive Apache-2.0 license poses no restriction. Install it if you're writing tests that need Docker containers.

Install

pytest-docker-tools on PyPI

Before you install

Low friction: pure Python wheel with only pytest and docker as runtime dependencies. Active maintenance with a release 24 days ago; repository shows 102 stars and no archived status.

Requires Docker daemon running and accessible; pytest must be installed.

License in practice

Apache-2.0 is permissive; you can use this in commercial projects and modify it freely, with minimal restrictions beyond preserving license notices.

Quickstart

pip install pytest-docker-tools

# In conftest.py
from pytest_docker_tools import container, fetch

my_image = fetch(repository='redis:latest')
my_container = container(image='{my_image.id}', ports={'11211/tcp': None})

# In test_example.py
def test_redis(my_container):
    port = my_container.ports['11211/tcp'][0]
    # connect and test

Verify before relying

  • Whether fixture scopes (session, module, function) work as documented with pytest-xdist parallelism.
  • Performance characteristics when managing many concurrent containers under xdist.
  • Compatibility with Docker Desktop vs. other Docker installations.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release <4.0.0,>=3.9.0
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
pytestdocker
MaintenanceActively maintained 24 days since the last release
Last repo commit
First released
Downloads1,737,976 / month, #3,603 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Topic :: Software Development :: Testing

Evidence: pytest_docker_tools-3.1.10-py2.py3-none-any.whl

Tags

Capabilities
docker pytest fixturescontainer integration testingdocker-compose pytestsmoke testing docker imagespytest docker containersdocker test environment automationcontainer fixture factories
Topics
docker-testingpytest-pluginintegration-testing
PyPI keywords
devopsdockerpytest

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 › “smoke testing docker images”

  • pytest-docker-toolsProvides pytest fixture factories for declaratively defining…
  • pytest-celerypytest-celery is the official pytest plugin for Celery that enables…
  • tox-dockerA tox plugin that manages Docker container lifecycle during test…

Give your agent the search over MCP, or paste the wish link into any chat.

More Testing packages

pluggy Worth it
PyPI · Libraries · released May 2025

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.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

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.

MITpure Python · 3.10+
1.1Bdownloads / mo
virtualenv Worth it
PyPI · Libraries · released Aug 2026

virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.

MITpure Python · 3.9+
532.9Mdownloads / mo
coverage Worth it
PyPI · Testing · released Aug 2026

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.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
pytest-asyncio Worth it
PyPI · Testing · released May 2026

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.

Apache-2.0pure Python · 3.10+
275.9Mdownloads / mo
pytest-json-ctrf Worth it
PyPI · Testing · released Jul 2026

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.

MITpure Python · 3.8+
273.0Mdownloads / mo

See also pytest-container · pytest-docker · pytest-factoryboy · pytest-mock-resources · pytest-redis · pytest-postgresql · pytest-rabbitmq · pytest-mysql · pytest-databases · pytest-shutil