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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5293180fb2ca3b132f2d7dfffcb1d2a2603a38a1cbacb50e72a5d327339b1a33
|
|
| MD5 |
4c8085854d2a02c2d828d61372324d9c
|
|
| BLAKE2b-256 |
aae5c94dac1fc2eff2071cfc03594fe597a4b84e4f0aedb3966e273f2d288bf3
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
allure_pytest_ext-2.13.3.post1.tar.gz -
Subject digest:
5293180fb2ca3b132f2d7dfffcb1d2a2603a38a1cbacb50e72a5d327339b1a33 - Sigstore transparency entry: 422796333
- Sigstore integration time:
-
Permalink:
ramihsn/pytest-allure-propagate@f2a31a24178805bc46630dbb268ee382ddf52c2e -
Branch / Tag:
refs/tags/v2.13.3.post1 - Owner: https://github.com/ramihsn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-on-tag.yml@f2a31a24178805bc46630dbb268ee382ddf52c2e -
Trigger Event:
push
-
Statement type:
File details
Details for the file allure_pytest_ext-2.13.3.post1-py3-none-any.whl.
File metadata
- Download URL: allure_pytest_ext-2.13.3.post1-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
620c5ef35682006799309e8c4844a9b5e133ed6f3412a0038d346f16c421ff0a
|
|
| MD5 |
e59e236063b2bce24f972c47d1dc364e
|
|
| BLAKE2b-256 |
58314edb7561e85f03ec5400f5a85af9dd3367b5b78141a792c7cd9d1f88028f
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
allure_pytest_ext-2.13.3.post1-py3-none-any.whl -
Subject digest:
620c5ef35682006799309e8c4844a9b5e133ed6f3412a0038d346f16c421ff0a - Sigstore transparency entry: 422796346
- Sigstore integration time:
-
Permalink:
ramihsn/pytest-allure-propagate@f2a31a24178805bc46630dbb268ee382ddf52c2e -
Branch / Tag:
refs/tags/v2.13.3.post1 - Owner: https://github.com/ramihsn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-on-tag.yml@f2a31a24178805bc46630dbb268ee382ddf52c2e -
Trigger Event:
push
-
Statement type: