Skip to main content
https://img.shields.io/pypi/v/pytest-parametrized.svg https://img.shields.io/pypi/pyversions/pytest-parametrized.svg https://img.shields.io/pypi/status/pytest-parametrized.svg https://img.shields.io/travis/coady/pytest-parametrized.svg https://img.shields.io/codecov/c/github/coady/pytest-parametrized.svg

Pytest plugin for parametrizing tests with default iterables, providing alternative syntax for pytest.mark.parametrize.

Usage

Decorate tests with iterable default values.

@pytest.parametrized
def test(name=values, ...):
   """test single parametrized arg with each value"""

@pytest.parametrized.zip
def test(name=values, name1=values1, ...):
   """test parametrized args with zipped values"""

@pytest.parametrized.product
def test(name=values, name1=values1, ...):
   """test parametrized args with cartesian product of values"""

Simple parametrized fixtures also supported, for easier reuse.

fixture_name = pytest.parametrized.fixture(*params)

Installation

$ pip install pytest-parametrized

Require plugin as usual in conftest.py.

pytest_plugins = 'parametrized', ...

Tests

100% branch coverage.

$ pytest [--cov]

Changes

0.2

  • fixture keyword options

Release files for pytest-parametrized 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-parametrized 0.2
File Size Uploaded
pytest-parametrized-0.2.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-parametrized 0.2
File Interpreter ABI Platform
pytest_parametrized-0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size:7.6 kB

Release files / pytest-parametrized-0.2.tar.gz

Download URL pytest-parametrized-0.2.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
53fd1b44184f62f54ae3e79ec242b943dc8d5e849534ac61b5a0c869f8a1abc2
BLAKE2b-256 checksum
How to use checksums
684960b491bef1bfddc58cfb6c78dd1dde406d33d365476ce950d082e335ee93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pytest_parametrized-0.2-py2.py3-none-any.whl

Download URL pytest_parametrized-0.2-py2.py3-none-any.whl
Size 4.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a5377e79f252e220b7d78e00ceb6f021240205645f4b86b22b6748b7d7c09922
BLAKE2b-256 checksum
How to use checksums
7001ad10f1cdc6a3fb31398b3d4212876594f2e5f6b34f883c96acc933436e77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.8

2 release files

1.7

2 release files

1.6

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

This release

0.2 This release

2 release files

0.1

2 release files

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