Prerequisites

pytest_container works with Python 3.6 and later and requires pytest and pytest-testinfra. Additionally, for python 3.6, you’ll need the dataclasses module.

Tests leveraging pytest_container need to have access to a container runtime. Currently the following ones are supported:

The fixtures will default to using podman and buildah, if they are installed and work, otherwise docker will be used. You can also customize which runtime will be used via the environment variable CONTAINER_RUNTIME [1].