(self, pytester: Pytester, option)
| 87 | |
| 88 | class TestTerminal: |
| 89 | def test_pass_skip_fail(self, pytester: Pytester, option) -> None: |
| 90 | pytester.makepyfile( |
| 91 | """ |
| 92 | import pytest |
| 93 | def test_ok(): |
| 94 | pass |
| 95 | def test_skip(): |
| 96 | pytest.skip("xx") |
| 97 | def test_func(): |
| 98 | assert 0 |
| 99 | """ |
| 100 | ) |
| 101 | result = pytester.runpytest(*option.args) |
| 102 | if option.verbosity > 0: |
| 103 | result.stdout.fnmatch_lines( |
| 104 | [ |
| 105 | "*test_pass_skip_fail.py::test_ok PASS*", |
| 106 | "*test_pass_skip_fail.py::test_skip SKIP*", |
| 107 | "*test_pass_skip_fail.py::test_func FAIL*", |
| 108 | ] |
| 109 | ) |
| 110 | elif option.verbosity == 0: |
| 111 | result.stdout.fnmatch_lines(["*test_pass_skip_fail.py .sF*"]) |
| 112 | else: |
| 113 | result.stdout.fnmatch_lines([".sF*"]) |
| 114 | result.stdout.fnmatch_lines( |
| 115 | [" def test_func():", "> assert 0", "E assert 0"] |
| 116 | ) |
| 117 | |
| 118 | def test_console_output_style_times_with_skipped_and_passed( |
| 119 | self, pytester: Pytester |
nothing calls this directly
no test coverage detected