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