MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_non_ascii_paste_text

Method test_non_ascii_paste_text

testing/test_pastebin.py:64–83  ·  view source on GitHub ↗

Make sure that text which contains non-ascii characters is pasted correctly. See #1219.

(self, pytester: Pytester, pastebinlist)

Source from the content-addressed store, hash-verified

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
86class TestPaste:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected