tests.pytest_utils

tests.pytest_utils

Functions

Name Description
parametrize_dict Allow passing args and ids to pytest.mark.parametrize with a dict syntax

parametrize_dict

tests.pytest_utils.parametrize_dict(d)

Allow passing args and ids to pytest.mark.parametrize with a dict syntax

@pytest.mark.parametrize(‘a’, **parametrize_dict({ ‘first case’: 1, ‘second case’: 2, })) # equivalent to parametrize(‘a’, [1, 2], ids=[‘first_case’, ‘second case’]) def test(a): pass