Bug Fix 11456: Duplicated parameters in @pytest.mark.parametrize

This commit is contained in:
TanyaAgarwal28 2023-10-08 18:39:42 +05:30
parent be6b096de4
commit d89e68ed89
1 changed files with 13 additions and 0 deletions

View File

@ -367,6 +367,19 @@ class TestGeneralUsage:
result = pytester.runpytest(p)
result.assert_outcomes(failed=0, passed=9)
def test_direct_addressing_selects_duplicates_2(self, pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
import pytest
@pytest.mark.parametrize("a", [a,b,c,a_1])
def test_func(a):
pass
"""
)
result = pytester.runpytest(p)
result.assert_outcomes(failed=0, passed=9)
def test_direct_addressing_notfound(self, pytester: Pytester) -> None:
p = pytester.makepyfile(
"""