Skip to main content

Pytest Podman Plugin

A Pytest plugin for managing Podman containers during tests, similar to pytest-docker but tailored for Podman. It simplifies integration testing by automatically starting and stopping services defined in a podman-compose.yml file.

Features

  • Automatic Lifecycle Management: Starts services (podman compose up) before tests and stops them (podman compose down) afterwards.
  • Service Discovery: Helper methods to find the host port mapped to a container port.
  • Readiness Waiting: Built-in mechanism to wait for services to become responsive.
  • Scoped Fixtures: Configurable scope (default: session) to share containers across tests or restart them per test.

Installation

You can install the plugin via pip:

pip install podman_pytest

Usage

1. Create a podman-compose.yml

Create a podman-compose.yml file in your tests/ directory (or configure the path).

version: '3'
services:
  httpbin:
    image: kennethreitz/httpbin
    ports:
      - "80"

Metadata

Release files for pytest-podman 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-podman 0.0.1
File Size Uploaded
pytest_podman-0.0.1.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-podman 0.0.1
File Interpreter ABI Platform
pytest_podman-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / pytest_podman-0.0.1.tar.gz

Download URL pytest_podman-0.0.1.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b5ac6451b7ccc8011c4a440ff3842931c70572fb9d206f7df0de206693471a10
BLAKE2b-256 checksum
How to use checksums
f493f3b0249284b02f9c275f9922317ceab84ebbfb0c2d9014f6c0dcf4024208
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / pytest_podman-0.0.1-py3-none-any.whl

Download URL pytest_podman-0.0.1-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75d1b01050eb8fd1b0695e53b86f2271c5896495fdd312e380870e4b90e7014a
BLAKE2b-256 checksum
How to use checksums
b53a814fec9f65716a6dee1e4d061b665c34ceedd664b2691a477813f2f5aedd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page