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

Method test_read_write

testing/_py/test_local.py:1544–1551  ·  testing/_py/test_local.py::TestUnicode.test_read_write
(self, tmpdir)

Source from the content-addressed store, hash-verified

1542
1543 @pytest.mark.xfail(reason=class="st">"changing read/write might break existing usages")
1544 def test_read_write(self, tmpdir):
1545 x = tmpdir.join(class="st">"hello")
1546 part = class="st">"hällo"
1547 with ignore_encoding_warning():
1548 x.write(part)
1549 assert x.read() == part
1550 x.write(part.encode(sys.getdefaultencoding()))
1551 assert x.read() == part.encode(sys.getdefaultencoding())
1552
1553
1554class TestBinaryAndTextMethods:

Callers

nothing calls this directly

Calls 4

ignore_encoding_warningFunction · 0.85
joinMethod · 0.80
writeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected