Skip to main content

Pytest plugin for agent-saga: deterministic replay verification, chaos injection, and WAL fixtures.

Project description

pytest-agent-saga

Official Pytest plugin for agent-saga — bringing deterministic replay verification, chaos injection testing, and WAL assertions to your AI agent test suite.

Installation

pip install pytest-agent-saga

Features & Fixtures

  • saga_wal: Isolated temporary file WAL fixture per test.
  • chaos_runner: Inject synthetic failures at step boundaries or run mutation testing over compensation handlers.
  • assert_saga_deterministic: Verify that a saga's forward and compensation execution matches deterministically across test runs.

Example

import pytest

async def test_order_saga(saga_wal, chaos_runner):
    # Run saga under chaos injection
    result = await chaos_runner.run(my_order_saga, fail_point=2)
    assert result.rolled_back is True
    assert "refund_payment" in result.compensations_executed

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_agent_saga-0.4.1.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

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

pytest_agent_saga-0.4.1-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file pytest_agent_saga-0.4.1.tar.gz.

File metadata

  • Download URL: pytest_agent_saga-0.4.1.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pytest_agent_saga-0.4.1.tar.gz
Algorithm Hash digest
SHA256 912c7d4b7199a7d27adb98f4a9fd234e9360b3bd6f3b830a63fc02c4b2171a91
MD5 700aae82b7b7e7b31d581daf23945275
BLAKE2b-256 052ae606fb82accdb7bcb393b686924bfd2fe4bf4bc6eaefadb066d39c4ebcf3

See more details on using hashes here.

File details

Details for the file pytest_agent_saga-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_agent_saga-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 69a8c6c5b7f1d46952fb2ebffc2b1ce0106020b07d993f1cc714b9eb5962b4c8
MD5 e995337b30bf39b22baef17ed9768b84
BLAKE2b-256 44385b624367b5e47011eddc6e6d26861b5b8e6577ebde0713b3c14d987b3854

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