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

Method test_capfdbinary

testing/test_capture.py:535–547  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

533 assert out.endswith(nl)
534
535 def test_capfdbinary(self, pytester: Pytester) -> None:
536 reprec = pytester.inline_runsource(
537 """\
538 def test_hello(capfdbinary):
539 import os
540 # some likely un-decodable bytes
541 os.write(1, b'\\xfe\\x98\\x20')
542 out, err = capfdbinary.readouterr()
543 assert out == b'\\xfe\\x98\\x20'
544 assert err == b''
545 """
546 )
547 reprec.assertoutcome(passed=1)
548
549 def test_capsysbinary(self, pytester: Pytester) -> None:
550 p1 = pytester.makepyfile(

Callers

nothing calls this directly

Calls 2

assertoutcomeMethod · 0.80
inline_runsourceMethod · 0.45

Tested by

no test coverage detected