(self, pytester: Pytester, scope, ok, error)
| 3228 | ) |
| 3229 | |
| 3230 | def test_setup(self, pytester: Pytester, scope, ok, error) -> None: |
| 3231 | pytester.makepyfile( |
| 3232 | """ |
| 3233 | import pytest |
| 3234 | @pytest.fixture(scope=%r, autouse=True) |
| 3235 | def myscoped(request): |
| 3236 | for x in %r: |
| 3237 | assert hasattr(request, x) |
| 3238 | for x in %r: |
| 3239 | pytest.raises(AttributeError, lambda: |
| 3240 | getattr(request, x)) |
| 3241 | assert request.session |
| 3242 | assert request.config |
| 3243 | def test_func(): |
| 3244 | pass |
| 3245 | """ |
| 3246 | % (scope, ok.split(), error.split()) |
| 3247 | ) |
| 3248 | reprec = pytester.inline_run("-l") |
| 3249 | reprec.assertoutcome(passed=1) |
| 3250 | |
| 3251 | def test_funcarg(self, pytester: Pytester, scope, ok, error) -> None: |
| 3252 | pytester.makepyfile( |
nothing calls this directly
no test coverage detected