Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 342 Bytes

PT014.md

File metadata and controls

25 lines (18 loc) · 342 Bytes

PT014

found duplicate test cases {indexes} in @pytest.mark.parametrize

Examples

Bad code:

import pytest

@pytest.mark.parametrize(
    ('param1', 'param2'),
    [
        (1, 2),
        (1, 2),
    ]
)
def test_foo(param1, param2):
    ...

Rationale

  • to help avoid duplicate test cases and accidental mistakes