Skip to main content

Pytest plugin for Podman integration

Project description

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"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_podman-0.0.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_podman-0.0.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pytest_podman-0.0.1.tar.gz.

File metadata

  • Download URL: pytest_podman-0.0.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for pytest_podman-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b5ac6451b7ccc8011c4a440ff3842931c70572fb9d206f7df0de206693471a10
MD5 59b0136fe09b752eaa31157cdf152bb0
BLAKE2b-256 f493f3b0249284b02f9c275f9922317ceab84ebbfb0c2d9014f6c0dcf4024208

See more details on using hashes here.

File details

Details for the file pytest_podman-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pytest_podman-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for pytest_podman-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 75d1b01050eb8fd1b0695e53b86f2271c5896495fdd312e380870e4b90e7014a
MD5 ca21b2e5e3400f81debf713ec5ee3815
BLAKE2b-256 b53a814fec9f65716a6dee1e4d061b665c34ceedd664b2691a477813f2f5aedd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page