(pytester: Pytester, mode)
| 127 | |
| 128 | |
| 129 | def test_show_fixtures_with_parameters(pytester: Pytester, mode) -> None: |
| 130 | pytester.makeconftest( |
| 131 | ''' |
| 132 | import pytest |
| 133 | @pytest.fixture(scope='session', params=['foo', 'bar']) |
| 134 | def arg_same(): |
| 135 | """session scoped fixture""" |
| 136 | ''' |
| 137 | ) |
| 138 | p = pytester.makepyfile( |
| 139 | ''' |
| 140 | import pytest |
| 141 | @pytest.fixture(scope='function') |
| 142 | def arg_other(arg_same): |
| 143 | """function scoped fixture""" |
| 144 | def test_arg1(arg_other): |
| 145 | pass |
| 146 | ''' |
| 147 | ) |
| 148 | |
| 149 | result = pytester.runpytest(mode, p) |
| 150 | assert result.ret == 0 |
| 151 | |
| 152 | result.stdout.fnmatch_lines( |
| 153 | [ |
| 154 | "SETUP S arg_same?'foo'?", |
| 155 | "TEARDOWN S arg_same?'foo'?", |
| 156 | "SETUP S arg_same?'bar'?", |
| 157 | "TEARDOWN S arg_same?'bar'?", |
| 158 | ] |
| 159 | ) |
| 160 | |
| 161 | |
| 162 | def test_show_fixtures_with_parameter_ids(pytester: Pytester, mode) -> None: |
nothing calls this directly
no test coverage detected