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

Method test_open_and_ensure

testing/_py/test_local.py:710–714  ·  testing/_py/test_local.py::TestLocalPath.test_open_and_ensure
(self, path1)

Source from the content-addressed store, hash-verified

708 assert sorted(lst) == [path4, path2, path3]
709
710 def test_open_and_ensure(self, path1):
711 p = path1.join(class="st">"sub1", class="st">"sub2", class="st">"file")
712 with p.open(class="st">"w", ensure=1, encoding=class="st">"utf-8") as f:
713 f.write(class="st">"hello")
714 assert p.read_text(encoding=class="st">"utf-8") == class="st">"hello"
715
716 def test_write_and_ensure(self, path1):
717 p = path1.join(class="st">"sub1", class="st">"sub2", class="st">"file")

Callers

nothing calls this directly

Calls 4

joinMethod · 0.80
openMethod · 0.80
read_textMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected