{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/5"},{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance/3"}],"enrichment":{"capability":"A pytest plugin that automates container testing by managing container lifecycle, port binding, volume mounting, and health checks, letting you write tests against container images using testinfra.","skillfed_tags":["container-testing","pytest-plugin","infrastructure-as-code"],"use_cases":["Verify that a Dockerfile produces a working image by testing file presence, package installation, and service startup inside the container.","Run the same test suite against multiple OS container images to ensure cross-platform compatibility.","Test multi-container setups by creating and destroying podman pods within pytest fixtures.","Validate container port bindings and volume mounts by asserting on container state from the host.","Integrate container image validation into CI/CD pipelines as part of a standard pytest test run."],"what_it_does":"pytest-container is a pytest plugin that wraps the complexity of container-based testing. It provides fixtures that automatically pull, launch, and tear down container images, bind exposed ports to free host ports, mount volumes, and wait for containers to become healthy\u2014all without you writing boilerplate. Your test functions receive a testinfra connection object to run assertions inside the running container (checking for files, installed packages, services, etc.), turning container image validation into ordinary pytest tests.\n\nThe plugin handles the tedious infrastructure work: finding free ports, managing temporary directories for volumes, cleaning up after tests, orchestrating dependent container builds in the right order, and supporting parallel test execution. It's designed for functional testing of OS container images and verifying that software runs correctly across multiple operating systems or distributions.","worth_installing":"Yes, if you need to test container images programmatically. The plugin is actively maintained, has low install friction, and solves a real problem\u2014automating container lifecycle management in tests. The LGPL-2.1-or-later license requires source distribution if you modify and redistribute, which is typical for testing tools. No known security vulnerabilities. Suitable for teams building and validating container images as part of their development workflow."},"id":"pytest-container","links":{"html":"https://skillfed.io/packages/pytest-container","md":"https://skillfed.io/packages/pytest-container.md","pypi":"https://pypi.org/project/pytest-container/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-06-30","license_spdx":null,"license_treatment":"copyleft","name":"pytest-container","python_support":"unspecified","summary":"Pytest fixtures for writing container based tests"},"popularity":{"monthly_downloads":167086,"position":10479,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.4.4"}
