Parametrize your tests with a Boston accent!
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.