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

Method ensure_dir

src/_pytest/_py/path.py:450–452  ·  src/_pytest/_py/path.py::LocalPath.ensure_dir

Ensure the path joined with args is a directory.

(self, *args)

Source from the content-addressed store, hash-verified

448 return class="st">""
449
450 def ensure_dir(self, *args):
451 class="st">""class="st">"Ensure the path joined with args is a directory."class="st">""
452 return self.ensure(*args, dir=True)
453
454 def bestrelpath(self, dest):
455 class="st">"""Return a string which is a relative path from self

Callers 1

test_ensure_dirMethod · 0.80

Calls 1

ensureMethod · 0.95

Tested by 1

test_ensure_dirMethod · 0.64