Skip to main content

nrevah-parametrization

Simpler PyTest parametrization

How to install

pip install nrevah-parametrization

How to use

Parametrization (or the short alias p) provides a decorator-based API for parametrizing pytest tests.

Explicit parameters

from parametrization import p

@p.parameters("actual", "expected")
@p.case(name="some_case_0", actual=1, expected=2)
@p.case("some_case_1", actual=1, expected=2)
@p.case("some_case_2", 1, expected=1)
@p.case("some_case_3", 2, 2)
@p.case("some_case_4", 3, 3)
def test_somthing(actual, expected):
    assert actual == expected

Auto-detect parameters

from parametrization import p

@p.autodetect_parameters()
@p.case(name="some_case_0", actual=1, expected=2)
@p.case("some_case_1", actual=1, expected=2)
@p.case("some_case_2", actual=1, expected=1)
def test_somthing(actual, expected):
    assert actual == expected

Auto-detect parameters with default parameter

from parametrization import p

@p.autodetect_parameters()
@p.default_parameters(expected=None)
@p.case(name="some_case_0", actual=1, expected=2)
@p.case("some_case_1", actual=1, expected=2)
@p.case("some_case_2", actual=1, expected=1)
@p.case("some_case_2", actual=1)
def test_somthing(actual, expected):
    assert actual == expected

Generate name based on arguments

from parametrization import p

@p.name_factory(lambda actual, expected: f"{actual}=={expected}")
@p.case(actual=1, expected=1)
@p.case(actual=2, expected=2)
@p.case("special-name", actual=3, expected=3)
def test_somthing(actual, expected):
    assert actual == expected

As can be seen from the example, you can also give explicit name for a case even if you are using name factory.

The long form Parametrization is also available for those who prefer it:

from parametrization import Parametrization

@Parametrization.autodetect_parameters()
@Parametrization.case(name="some_case_0", actual=1, expected=2)
def test_somthing(actual, expected):
    assert actual == expected

Metadata

Release files for nrevah-parametrization 1.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 nrevah-parametrization 1.0.1
File Size Uploaded Provenance
nrevah_parametrization-1.0.1.tar.gz 2.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nrevah-parametrization 1.0.1
File Interpreter ABI Platform
nrevah_parametrization-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.7 kB

Release files / nrevah_parametrization-1.0.1.tar.gz

Download URL nrevah_parametrization-1.0.1.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4b3f29c4b77bf0f9a7f2b02329c6c5e68f0cfb78577cce39fd2d75dede042fcb
BLAKE2b-256 checksum
How to use checksums
38535b1df1296fe919d36bebb719fa34a49839171028d9e92bfbf2f0b136dc82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 4, 2026.

Transparency log

Release files / nrevah_parametrization-1.0.1-py3-none-any.whl

Download URL nrevah_parametrization-1.0.1-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f47cbccd6ed62c508bccad55e4969b156e382d90dc9bc4b5d31c6b140a664a62
BLAKE2b-256 checksum
How to use checksums
6f76c3a6edbd725fa5c8384501fcf15e957032754aabca014522d2909f3219f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 4, 2026.

Transparency log

Security for nrevah-parametrization 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nrevah_parametrization-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files Full provenance

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