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

Method mkdir

src/_pytest/pytester.py:923–934  ·  src/_pytest/pytester.py::Pytester.mkdir

Create a new (sub)directory. :param name: The name of the directory, relative to the pytester path. :returns: The created directory. :rtype: pathlib.Path

(self, name: str | os.PathLike[str])

Source from the content-addressed store, hash-verified

921 self._monkeypatch.syspath_prepend(str(path))
922
923 def mkdir(self, name: str | os.PathLike[str]) -> Path:
924 class="st">"""Create a new (sub)directory.
925
926 :param name:
927 The name of the directory, relative to the pytester path.
928 :returns:
929 The created directory.
930 :rtype: pathlib.Path
931 class="st">"""
932 p = self.path / name
933 p.mkdir()
934 return p
935
936 def mkpydir(self, name: str | os.PathLike[str]) -> Path:
937 class="st">"""Create a new python package.

Callers 15

set_log_pathMethod · 0.45
make_numbered_dirFunction · 0.45
_makefileMethod · 0.45
mkpydirMethod · 0.45
spawn_pytestMethod · 0.45
mktempMethod · 0.45
getbasetempMethod · 0.45
get_sessionFunction · 0.45
test_headerMethod · 0.45
test_no_headerMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected