Skip to main content

Extensions for allure-pytest: propagate step failures and aggregate step failures

Project description

allure-pytest-ext

Extensions for allure-pytest==2.13.3 adding:

  • with allure.step("...", propagate=True): if any exception happens inside the step and is caught by user code, the step still fails and the original error re-raises after the step exits (unless running inside an aggregate step).
  • with allure.aggregate_step("..."): runs all child steps even if some fail; after all children finish, raises a single aggregated exception if any child failed.

Requirements

  • Python 3.8+
  • allure-pytest==2.13.3
  • Managed with uv

Install

uv add allure-pytest-ext

Usage

import allure

# Propagating a caught error
with pytest.raises(ValueError):
    with allure.step("propagate caught", propagate=True):
        try:
            raise ValueError("boom")
        except ValueError:
            pass  # The step fails and the error is re-raised after the step ends

# Aggregating child failures
with pytest.raises(Exception):
    with allure.aggregate_step("aggregate children"):
        with allure.step("child 1"):
            raise ValueError("first")
        with allure.step("child 2"):
            raise RuntimeError("second")

Development

uv sync --all-extras --dev
uv run pytest -q
uv run black --check src tests
uv run flake8 src tests
uv run mypy --strict src tests

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

allure_pytest_ext-2.13.3.post1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

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

allure_pytest_ext-2.13.3.post1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file allure_pytest_ext-2.13.3.post1.tar.gz.

File metadata

  • Download URL: allure_pytest_ext-2.13.3.post1.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for allure_pytest_ext-2.13.3.post1.tar.gz
Algorithm Hash digest
SHA256 5293180fb2ca3b132f2d7dfffcb1d2a2603a38a1cbacb50e72a5d327339b1a33
MD5 4c8085854d2a02c2d828d61372324d9c
BLAKE2b-256 aae5c94dac1fc2eff2071cfc03594fe597a4b84e4f0aedb3966e273f2d288bf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for allure_pytest_ext-2.13.3.post1.tar.gz:

Publisher: release-on-tag.yml on ramihsn/pytest-allure-propagate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file allure_pytest_ext-2.13.3.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for allure_pytest_ext-2.13.3.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 620c5ef35682006799309e8c4844a9b5e133ed6f3412a0038d346f16c421ff0a
MD5 e59e236063b2bce24f972c47d1dc364e
BLAKE2b-256 58314edb7561e85f03ec5400f5a85af9dd3367b5b78141a792c7cd9d1f88028f

See more details on using hashes here.

Provenance

The following attestation bundles were made for allure_pytest_ext-2.13.3.post1-py3-none-any.whl:

Publisher: release-on-tag.yml on ramihsn/pytest-allure-propagate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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