Merge pull request #9893 from jparise/pytester-mkdir-path
This commit is contained in:
commit
a47e91e077
|
@ -904,13 +904,13 @@ class Pytester:
|
||||||
|
|
||||||
self._monkeypatch.syspath_prepend(str(path))
|
self._monkeypatch.syspath_prepend(str(path))
|
||||||
|
|
||||||
def mkdir(self, name: str) -> Path:
|
def mkdir(self, name: Union[str, "os.PathLike[str]"]) -> Path:
|
||||||
"""Create a new (sub)directory."""
|
"""Create a new (sub)directory."""
|
||||||
p = self.path / name
|
p = self.path / name
|
||||||
p.mkdir()
|
p.mkdir()
|
||||||
return p
|
return p
|
||||||
|
|
||||||
def mkpydir(self, name: str) -> Path:
|
def mkpydir(self, name: Union[str, "os.PathLike[str]"]) -> Path:
|
||||||
"""Create a new python package.
|
"""Create a new python package.
|
||||||
|
|
||||||
This creates a (sub)directory with an empty ``__init__.py`` file so it
|
This creates a (sub)directory with an empty ``__init__.py`` file so it
|
||||||
|
|
Loading…
Reference in New Issue