()
| 294 | |
| 295 | @pytest.fixture |
| 296 | def create_junction() -> Callable[[Path, Path], None]: # pragma: win32 cover |
| 297 | # A junction needs no privilege, unlike a symlink, and lstat reports it as a directory. |
| 298 | def create(link: Path, target: Path) -> None: |
| 299 | if sys.platform == "win32": # pragma: no branch # narrows _winapi for the type checker |
| 300 | import _winapi |
| 301 | |
| 302 | _winapi.CreateJunction(str(target), str(link)) |
| 303 | |
| 304 | return create |
| 305 | |
| 306 | |
| 307 | @pytest.fixture |
no outgoing calls
no test coverage detected