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

Function test_capturing_bytes_in_utf8_encoding

testing/test_capture.py:118–126  ·  view source on GitHub ↗
(pytester: Pytester, method: str)

Source from the content-addressed store, hash-verified

116
117@pytest.mark.parametrize("method", ["fd", "sys"])
118def test_capturing_bytes_in_utf8_encoding(pytester: Pytester, method: str) -> None:
119 pytester.makepyfile(
120 """\
121 def test_unicode():
122 print('b\\u00f6y')
123 """
124 )
125 result = pytester.runpytest("--capture=%s" % method)
126 result.stdout.fnmatch_lines(["*1 passed*"])
127
128
129def test_collect_capturing(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected