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

Method test_read_textwrite

testing/_py/test_local.py:1565–1571  ·  testing/_py/test_local.py::TestBinaryAndTextMethods.test_read_textwrite
(self, tmpdir)

Source from the content-addressed store, hash-verified

1563 assert isinstance(s, str)
1564
1565 def test_read_textwrite(self, tmpdir):
1566 x = tmpdir.join(class="st">"hello")
1567 part = class="st">"hällo"
1568 part_utf8 = part.encode(class="st">"utf8")
1569 x.write_text(part, encoding=class="st">"utf8")
1570 assert x.read_binary() == part_utf8
1571 assert x.read_text(encoding=class="st">"utf8") == part
1572
1573 def test_default_encoding(self, tmpdir):
1574 x = tmpdir.join(class="st">"hello")

Callers

nothing calls this directly

Calls 4

joinMethod · 0.80
write_textMethod · 0.80
read_binaryMethod · 0.80
read_textMethod · 0.80

Tested by

no test coverage detected