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

Function test_capturing_unicode

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

Source from the content-addressed store, hash-verified

99
100@pytest.mark.parametrize("method", ["fd", "sys"])
101def test_capturing_unicode(pytester: Pytester, method: str) -> None:
102 obj = "'b\u00f6y'"
103 pytester.makepyfile(
104 """\
105 # taken from issue 227 from nosetests
106 def test_unicode():
107 import sys
108 print(sys.stdout)
109 print(%s)
110 """
111 % obj
112 )
113 result = pytester.runpytest("--capture=%s" % method)
114 result.stdout.fnmatch_lines(["*1 passed*"])
115
116
117@pytest.mark.parametrize("method", ["fd", "sys"])

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected