File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -5399,3 +5399,30 @@ def test_it(request, fix1):
53995399 )
54005400 result = pytester .runpytest ("-v" )
54015401 result .assert_outcomes (passed = 1 )
5402+
5403+
5404+ def test_overridden_fixture_depends_on_parametrized (pytester : Pytester ) -> None :
5405+ """#11075"""
5406+ pytester .makepyfile (
5407+ """
5408+ import pytest
5409+
5410+ @pytest.fixture(params=["foo"])
5411+ def fixture_foo(request):
5412+ yield request.param
5413+
5414+ @pytest.fixture
5415+ def fixture_bar(fixture_foo):
5416+ yield fixture_foo
5417+
5418+ class TestFoobar:
5419+ @pytest.fixture
5420+ def fixture_bar(self, fixture_bar):
5421+ yield fixture_bar
5422+
5423+ def test_foobar(self, fixture_bar):
5424+ assert fixture_bar == "foo"
5425+ """
5426+ )
5427+ result = pytester .runpytest ("-v" )
5428+ result .assert_outcomes (passed = 1 )
You can’t perform that action at this time.
0 commit comments