MCPcopy
hub / github.com/pytest-dev/pytest / test_read_binwrite

Method test_read_binwrite

testing/_py/test_local.py:1555–1563  ·  testing/_py/test_local.py::TestBinaryAndTextMethods.test_read_binwrite
(self, tmpdir)

Source from the content-addressed store, hash-verified

1553
1554class TestBinaryAndTextMethods:
1555 def test_read_binwrite(self, tmpdir):
1556 x = tmpdir.join(class="st">"hello")
1557 part = class="st">"hällo"
1558 part_utf8 = part.encode(class="st">"utf8")
1559 x.write_binary(part_utf8)
1560 assert x.read_binary() == part_utf8
1561 s = x.read_text(encoding=class="st">"utf8")
1562 assert s == part
1563 assert isinstance(s, str)
1564
1565 def test_read_textwrite(self, tmpdir):
1566 x = tmpdir.join(class="st">"hello")

Callers

nothing calls this directly

Calls 4

joinMethod · 0.80
write_binaryMethod · 0.80
read_binaryMethod · 0.80
read_textMethod · 0.80

Tested by

no test coverage detected