(pytester: Pytester, mode)
| 66 | |
| 67 | |
| 68 | def test_show_nested_fixtures(pytester: Pytester, mode) -> None: |
| 69 | pytester.makeconftest( |
| 70 | ''' |
| 71 | import pytest |
| 72 | @pytest.fixture(scope='session') |
| 73 | def arg_same(): |
| 74 | """session scoped fixture""" |
| 75 | ''' |
| 76 | ) |
| 77 | p = pytester.makepyfile( |
| 78 | ''' |
| 79 | import pytest |
| 80 | @pytest.fixture(scope='function') |
| 81 | def arg_same(arg_same): |
| 82 | """function scoped fixture""" |
| 83 | def test_arg1(arg_same): |
| 84 | pass |
| 85 | ''' |
| 86 | ) |
| 87 | |
| 88 | result = pytester.runpytest(mode, p) |
| 89 | assert result.ret == 0 |
| 90 | |
| 91 | result.stdout.fnmatch_lines( |
| 92 | [ |
| 93 | "SETUP S arg_same*", |
| 94 | "*SETUP F arg_same (fixtures used: arg_same)*", |
| 95 | "*test_arg1 (fixtures used: arg_same)*", |
| 96 | "*TEARDOWN F arg_same*", |
| 97 | "TEARDOWN S arg_same*", |
| 98 | ] |
| 99 | ) |
| 100 | |
| 101 | |
| 102 | def test_show_fixtures_with_autouse(pytester: Pytester, mode) -> None: |
nothing calls this directly
no test coverage detected