(self, pytester: Pytester)
| 2087 | assert values == ["fin_a1", "fin_a2", "fin_b1", "fin_b2"] * 2 |
| 2088 | |
| 2089 | def test_scope_ordering(self, pytester: Pytester) -> None: |
| 2090 | pytester.makepyfile( |
| 2091 | """ |
| 2092 | import pytest |
| 2093 | values = [] |
| 2094 | @pytest.fixture(scope="function", autouse=True) |
| 2095 | def fappend2(): |
| 2096 | values.append(2) |
| 2097 | @pytest.fixture(scope="class", autouse=True) |
| 2098 | def classappend3(): |
| 2099 | values.append(3) |
| 2100 | @pytest.fixture(scope="module", autouse=True) |
| 2101 | def mappend(): |
| 2102 | values.append(1) |
| 2103 | |
| 2104 | class TestHallo(object): |
| 2105 | def test_method(self): |
| 2106 | assert values == [1,3,2] |
| 2107 | """ |
| 2108 | ) |
| 2109 | reprec = pytester.inline_run() |
| 2110 | reprec.assertoutcome(passed=1) |
| 2111 | |
| 2112 | def test_parametrization_setup_teardown_ordering(self, pytester: Pytester) -> None: |
| 2113 | pytester.makepyfile( |
nothing calls this directly
no test coverage detected