(pytester: Pytester, mode)
| 100 | |
| 101 | |
| 102 | def test_show_fixtures_with_autouse(pytester: Pytester, mode) -> None: |
| 103 | p = pytester.makepyfile( |
| 104 | ''' |
| 105 | import pytest |
| 106 | @pytest.fixture |
| 107 | def arg_function(): |
| 108 | """function scoped fixture""" |
| 109 | @pytest.fixture(scope='session', autouse=True) |
| 110 | def arg_session(): |
| 111 | """session scoped fixture""" |
| 112 | def test_arg1(arg_function): |
| 113 | pass |
| 114 | ''' |
| 115 | ) |
| 116 | |
| 117 | result = pytester.runpytest(mode, p) |
| 118 | assert result.ret == 0 |
| 119 | |
| 120 | result.stdout.fnmatch_lines( |
| 121 | [ |
| 122 | "SETUP S arg_session*", |
| 123 | "*SETUP F arg_function*", |
| 124 | "*test_arg1 (fixtures used: arg_function, arg_session)*", |
| 125 | ] |
| 126 | ) |
| 127 | |
| 128 | |
| 129 | def test_show_fixtures_with_parameters(pytester: Pytester, mode) -> None: |
nothing calls this directly
no test coverage detected