{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/3"}],"enrichment":{"capability":"pytest-docker provides pytest fixtures that automatically spin up and tear down Docker containers from a docker-compose.yml file for the duration of your test session, eliminating manual container lifecycle management.","skillfed_tags":["docker","integration-testing","fixtures"],"use_cases":["Write integration tests against a real database running in a container without manual docker-compose commands.","Test HTTP services by spinning up a containerized service and making requests to it from pytest.","Validate multi-service interactions in a single test run using docker-compose to define the stack.","Debug test failures in an IDE by pinning the compose project name and reusing containers across debug sessions.","Use multiple docker-compose files to compose different service stacks for different test scenarios."],"what_it_does":"pytest-docker is a pytest plugin that manages Docker containers as test fixtures. It reads a docker-compose.yml file, starts all defined services before tests run, and tears them down afterward\u2014all handled transparently by pytest's fixture system. You define your services once in compose YAML, then inject a docker_services fixture into your tests to query container ports, wait for readiness, and interact with running services.\n\nThe plugin handles the boilerplate of container lifecycle management, port mapping discovery, and health checks. It supports both Docker Compose V2 (default, via the docker compose command) and V1 (via optional extra or custom fixture override). Tests run against real containerized services rather than mocks, making integration tests more realistic and catching issues that unit tests miss.","worth_installing":"Yes. pytest-docker is a well-established plugin (in top 5000 PyPI packages by downloads) with low install friction, permissive licensing, no known vulnerabilities, and active maintenance. It solves a real problem\u2014automating container lifecycle for integration tests\u2014cleanly. Install it if your test suite needs real containerized services rather than mocks or if you're already using docker-compose for local development."},"id":"pytest-docker","links":{"html":"https://skillfed.io/packages/pytest-docker","md":"https://skillfed.io/packages/pytest-docker.md","pypi":"https://pypi.org/project/pytest-docker/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-11-12","license_spdx":null,"license_treatment":"permissive","name":"pytest-docker","python_support":"supports_current","summary":"Simple pytest fixtures for Docker and Docker Compose based tests"},"popularity":{"monthly_downloads":2387633,"position":3092,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"3.2.5"}
