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