Prepend a directory to sys.path, defaults to :attr:`path`. This is undone automatically when this object dies at the end of each test.
(
self, path: Optional[Union[str, "os.PathLike[str]"]] = None
)
| 890 | return self._makefile(".txt", args, kwargs) |
| 891 | |
| 892 | def syspathinsert( |
| 893 | self, path: Optional[Union[str, "os.PathLike[str]"]] = None |
| 894 | ) -> None: |
| 895 | """Prepend a directory to sys.path, defaults to :attr:`path`. |
| 896 | |
| 897 | This is undone automatically when this object dies at the end of each |
| 898 | test. |
| 899 | """ |
| 900 | if path is None: |
| 901 | path = self.path |
| 902 | |
| 903 | self._monkeypatch.syspath_prepend(str(path)) |
| 904 | |
| 905 | def mkdir(self, name: str) -> Path: |
| 906 | """Create a new (sub)directory.""" |
no test coverage detected