(pytester: Pytester, mode)
| 160 | |
| 161 | |
| 162 | def test_show_fixtures_with_parameter_ids(pytester: Pytester, mode) -> None: |
| 163 | pytester.makeconftest( |
| 164 | ''' |
| 165 | import pytest |
| 166 | @pytest.fixture( |
| 167 | scope='session', params=['foo', 'bar'], ids=['spam', 'ham']) |
| 168 | def arg_same(): |
| 169 | """session scoped fixture""" |
| 170 | ''' |
| 171 | ) |
| 172 | p = pytester.makepyfile( |
| 173 | ''' |
| 174 | import pytest |
| 175 | @pytest.fixture(scope='function') |
| 176 | def arg_other(arg_same): |
| 177 | """function scoped fixture""" |
| 178 | def test_arg1(arg_other): |
| 179 | pass |
| 180 | ''' |
| 181 | ) |
| 182 | |
| 183 | result = pytester.runpytest(mode, p) |
| 184 | assert result.ret == 0 |
| 185 | |
| 186 | result.stdout.fnmatch_lines( |
| 187 | ["SETUP S arg_same?'spam'?", "SETUP S arg_same?'ham'?"] |
| 188 | ) |
| 189 | |
| 190 | |
| 191 | def test_show_fixtures_with_parameter_ids_function(pytester: Pytester, mode) -> None: |
nothing calls this directly
no test coverage detected