Skip to content

Commit a47e91e

Browse files
authored
Merge pull request #9893 from jparise/pytester-mkdir-path
2 parents 420dc78 + f6db7ae commit a47e91e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_pytest/pytester.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,13 +904,13 @@ def syspathinsert(
904904

905905
self._monkeypatch.syspath_prepend(str(path))
906906

907-
def mkdir(self, name: str) -> Path:
907+
def mkdir(self, name: Union[str, "os.PathLike[str]"]) -> Path:
908908
"""Create a new (sub)directory."""
909909
p = self.path / name
910910
p.mkdir()
911911
return p
912912

913-
def mkpydir(self, name: str) -> Path:
913+
def mkpydir(self, name: Union[str, "os.PathLike[str]"]) -> Path:
914914
"""Create a new python package.
915915
916916
This creates a (sub)directory with an empty ``__init__.py`` file so it

0 commit comments

Comments
 (0)