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

Method test_ensure_filepath_withdir

testing/_py/test_local.py:782–789  ·  testing/_py/test_local.py::TestLocalPath.test_ensure_filepath_withdir
(self, tmpdir)

Source from the content-addressed store, hash-verified

780 old.chdir()
781
782 def test_ensure_filepath_withdir(self, tmpdir):
783 newfile = tmpdir.join(class="st">"test1", class="st">"test")
784 newfile.ensure()
785 assert newfile.check(file=1)
786 newfile.write_text(class="st">"42", encoding=class="st">"utf-8")
787 newfile.ensure()
788 s = newfile.read_text(encoding=class="st">"utf-8")
789 assert s == class="st">"42"
790
791 def test_ensure_filepath_withoutdir(self, tmpdir):
792 newfile = tmpdir.join(class="st">"test1file")

Callers

nothing calls this directly

Calls 5

joinMethod · 0.80
ensureMethod · 0.80
write_textMethod · 0.80
read_textMethod · 0.80
checkMethod · 0.45

Tested by

no test coverage detected