def test_parametrized_fixture_scope_allowed(pytester: Pytester) -> None:
    """
    Make sure scope from parametrize does not affect fixture's ability to be
    depended upon.

    Regression test for #13248
    """
    pytester.makepyfile(
        """
        import pytest

        @pytest.fixture(scope="session")
        def my_fixture(request):
            return getattr(request, "param", None)

        @pytest.fixture(scope="session")
        def another_fixture(my_fixture):
            return my_fixture

        @pytest.mark.parametrize("my_fixture", ["a value"], indirect=True, scope="function")
        def test_foo(another_fixture):
            assert another_fixture == "a value"
        """
    )
    result = pytester.runpytest()
    result.assert_outcomes(passed=1)

    Make sure scope from parametrize does not affect fixture's ability to be
    depended upon.

    Regression test for #13248
    
testing/python/fixtures.py