(self, pytester: Pytester, pastebinlist)
| 34 | assert reprec.countoutcomes() == [1, 1, 1] |
| 35 | |
| 36 | def test_all(self, pytester: Pytester, pastebinlist) -> None: |
| 37 | from _pytest.pytester import LineMatcher |
| 38 | |
| 39 | testpath = pytester.makepyfile( |
| 40 | """ |
| 41 | import pytest |
| 42 | def test_pass(): |
| 43 | pass |
| 44 | def test_fail(): |
| 45 | assert 0 |
| 46 | def test_skip(): |
| 47 | pytest.skip("") |
| 48 | """ |
| 49 | ) |
| 50 | reprec = pytester.inline_run(testpath, "--pastebin=all", "-v") |
| 51 | assert reprec.countoutcomes() == [1, 1, 1] |
| 52 | assert len(pastebinlist) == 1 |
| 53 | contents = pastebinlist[0].decode("utf-8") |
| 54 | matcher = LineMatcher(contents.splitlines()) |
| 55 | matcher.fnmatch_lines( |
| 56 | [ |
| 57 | "*test_pass PASSED*", |
| 58 | "*test_fail FAILED*", |
| 59 | "*test_skip SKIPPED*", |
| 60 | "*== 1 failed, 1 passed, 1 skipped in *", |
| 61 | ] |
| 62 | ) |
| 63 | |
| 64 | def test_non_ascii_paste_text(self, pytester: Pytester, pastebinlist) -> None: |
| 65 | """Make sure that text which contains non-ascii characters is pasted |
nothing calls this directly
no test coverage detected