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

Method test_simple

testing/test_capture.py:957–969  ·  view source on GitHub ↗
(self, tmpfile: BinaryIO)

Source from the content-addressed store, hash-verified

955
956class TestFDCapture:
957 def test_simple(self, tmpfile: BinaryIO) -> None:
958 fd = tmpfile.fileno()
959 cap = capture.FDCapture(fd)
960 data = b"hello"
961 os.write(fd, data)
962 pytest.raises(AssertionError, cap.snap)
963 cap.done()
964 cap = capture.FDCapture(fd)
965 cap.start()
966 os.write(fd, data)
967 s = cap.snap()
968 cap.done()
969 assert s == "hello"
970
971 def test_simple_many(self, tmpfile: BinaryIO) -> None:
972 for i in range(10):

Callers 1

test_simple_manyMethod · 0.95

Calls 5

snapMethod · 0.95
filenoMethod · 0.45
writeMethod · 0.45
doneMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected