Make a symlink, or skip the test in case symlinks are not supported.
(
src: os.PathLike[str] | str,
dst: os.PathLike[str] | str,
**kwargs: Any,
)
| 471 | |
| 472 | |
| 473 | def symlink_or_skip( |
| 474 | src: os.PathLike[str] | str, |
| 475 | dst: os.PathLike[str] | str, |
| 476 | **kwargs: Any, |
| 477 | ) -> None: |
| 478 | """Make a symlink, or skip the test in case symlinks are not supported.""" |
| 479 | try: |
| 480 | os.symlink(src, dst, **kwargs) |
| 481 | except OSError as e: |
| 482 | skip(f"symlinks not supported: {e}") |
| 483 | |
| 484 | |
| 485 | class ImportMode(Enum): |
no outgoing calls