Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.55 KB

README.md

File metadata and controls

43 lines (32 loc) · 1.55 KB

pytest-pahrametahrize

PyPI - Python Version PyPI PyPI - License pre-commit.ci status Code style: black Open in Visual Studio Code Works for me!

Parametrize your tests with a Boston accent!

Examples

import pytest

TRUTHINESS_TEST_CASES = [
    (None, False),
    (False, False),
]


@pytest.mark.parametrize(("in_val", "truth_out"), TRUTHINESS_TEST_CASES)
def test_pahrametahrize(in_val, truth_out):
    assert bool(in_val) == truth_out

becomes:

import pytest

TRUTHINESS_TEST_CASES = [
    (None, False),
    (False, False),
]


@pytest.pahrametahrize(("in_val", "truth_out"), TRUTHINESS_TEST_CASES)
def test_pahrametahrize(in_val, truth_out):
    assert bool(in_val) == truth_out

Wicked pissah.