(pytester: Pytester)
| 209 | |
| 210 | |
| 211 | def test_dynamic_fixture_request(pytester: Pytester) -> None: |
| 212 | p = pytester.makepyfile( |
| 213 | """ |
| 214 | import pytest |
| 215 | @pytest.fixture() |
| 216 | def dynamically_requested_fixture(): |
| 217 | pass |
| 218 | @pytest.fixture() |
| 219 | def dependent_fixture(request): |
| 220 | request.getfixturevalue('dynamically_requested_fixture') |
| 221 | def test_dyn(dependent_fixture): |
| 222 | pass |
| 223 | """ |
| 224 | ) |
| 225 | |
| 226 | result = pytester.runpytest("--setup-only", p) |
| 227 | assert result.ret == 0 |
| 228 | |
| 229 | result.stdout.fnmatch_lines( |
| 230 | [ |
| 231 | "*SETUP F dynamically_requested_fixture", |
| 232 | "*TEARDOWN F dynamically_requested_fixture", |
| 233 | ] |
| 234 | ) |
| 235 | |
| 236 | |
| 237 | def test_capturing(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected