Prepend a directory to sys.path, defaults to :attr:`path`. This is undone automatically when this object dies at the end of each test. :param path: The path.
(self, path: str | os.PathLike[str] | None = None)
| 907 | return self._makefile(class="st">".txt", args, kwargs) |
| 908 | |
| 909 | def syspathinsert(self, path: str | os.PathLike[str] | None = None) -> None: |
| 910 | class="st">"""Prepend a directory to sys.path, defaults to :attr:`path`. |
| 911 | |
| 912 | This is undone automatically when this object dies at the end of each |
| 913 | test. |
| 914 | |
| 915 | :param path: |
| 916 | The path. |
| 917 | class="st">""" |
| 918 | if path is None: |
| 919 | path = self.path |
| 920 | |
| 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. |
no test coverage detected