(
pytester: Pytester, mode, dummy_yaml_custom_test
)
| 11 | |
| 12 | |
| 13 | def test_show_only_active_fixtures( |
| 14 | pytester: Pytester, mode, dummy_yaml_custom_test |
| 15 | ) -> None: |
| 16 | pytester.makepyfile( |
| 17 | ''' |
| 18 | import pytest |
| 19 | @pytest.fixture |
| 20 | def _arg0(): |
| 21 | """hidden arg0 fixture""" |
| 22 | @pytest.fixture |
| 23 | def arg1(): |
| 24 | """arg1 docstring""" |
| 25 | def test_arg1(arg1): |
| 26 | pass |
| 27 | ''' |
| 28 | ) |
| 29 | |
| 30 | result = pytester.runpytest(mode) |
| 31 | assert result.ret == 0 |
| 32 | |
| 33 | result.stdout.fnmatch_lines( |
| 34 | ["*SETUP F arg1*", "*test_arg1 (fixtures used: arg1)*", "*TEARDOWN F arg1*"] |
| 35 | ) |
| 36 | result.stdout.no_fnmatch_line("*_arg0*") |
| 37 | |
| 38 | |
| 39 | def test_show_different_scopes(pytester: Pytester, mode) -> None: |
nothing calls this directly
no test coverage detected