def test_parametrize_overrides_fixture(self, pytester: Pytester) -> None:
        """Test parametrization when parameter overrides existing fixture with same name."""
        pytester.makepyfile(
            """
            import pytest

            @pytest.fixture
            def value():
                return 'value'

            @pytest.mark.parametrize('value',
                                     ['overridden'])
            def test_overridden_via_param(value):
                assert value == 'overridden'

            @pytest.mark.parametrize('somevalue', ['overridden'])
            def test_not_overridden(value, somevalue):
                assert value == 'value'
                assert somevalue == 'overridden'

            @pytest.mark.parametrize('other,value', [('foo', 'overridden')])
            def test_overridden_via_multiparam(other, value):
                assert other == 'foo'
                assert value == 'overridden'
        """
        )
        rec = pytester.inline_run()
        rec.assertoutcome(passed=3)
Test parametrization when parameter overrides existing fixture with same name.
testing/python/collect.py