Make sure that text which contains non-ascii characters is pasted correctly. See #1219.
(self, pytester: Pytester, pastebinlist)
| 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 |
| 66 | correctly. See #1219. |
| 67 | """ |
| 68 | pytester.makepyfile( |
| 69 | test_unicode="""\ |
| 70 | def test(): |
| 71 | assert '☺' == 1 |
| 72 | """ |
| 73 | ) |
| 74 | result = pytester.runpytest("--pastebin=all") |
| 75 | expected_msg = "*assert '☺' == 1*" |
| 76 | result.stdout.fnmatch_lines( |
| 77 | [ |
| 78 | expected_msg, |
| 79 | "*== 1 failed in *", |
| 80 | "*Sending information to Paste Service*", |
| 81 | ] |
| 82 | ) |
| 83 | assert len(pastebinlist) == 1 |
| 84 | |
| 85 | |
| 86 | class TestPaste: |
nothing calls this directly
no test coverage detected