Pytest plugin for parametrizing tests with default iterables.
Project description
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
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
Built Distribution
File details
Details for the file pytest-parametrized-0.2.tar.gz
.
File metadata
- Download URL: pytest-parametrized-0.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53fd1b44184f62f54ae3e79ec242b943dc8d5e849534ac61b5a0c869f8a1abc2 |
|
MD5 | 611a00e2a4171108be310b354a3d6499 |
|
BLAKE2b-256 | 684960b491bef1bfddc58cfb6c78dd1dde406d33d365476ce950d082e335ee93 |
File details
Details for the file pytest_parametrized-0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: pytest_parametrized-0.2-py2.py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5377e79f252e220b7d78e00ceb6f021240205645f4b86b22b6748b7d7c09922 |
|
MD5 | e5ab000380e0101c46cc953bbd6b2049 |
|
BLAKE2b-256 | 7001ad10f1cdc6a3fb31398b3d4212876594f2e5f6b34f883c96acc933436e77 |