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

Method test_read_textwrite

testing/_py/test_local.py:1565–1571  ·  view source on GitHub ↗
(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("hello")
1567 part = "hällo"
1568 part_utf8 = part.encode("utf8")
1569 x.write_text(part, encoding="utf8")
1570 assert x.read_binary() == part_utf8
1571 assert x.read_text(encoding="utf8") == part
1572
1573 def test_default_encoding(self, tmpdir):
1574 x = tmpdir.join("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