(script: str, *args: Path)
| 18 | |
| 19 | |
| 20 | def _python_without_links(script: str, *args: Path) -> str: |
| 21 | # The backend snapshots os.link support at import, as on Termux. |
| 22 | prefix = "import os, sys\nif hasattr(os, 'link'):\n del os.link\n" |
| 23 | result = subprocess.run([sys.executable, "-c", prefix + script, *args], capture_output=True, check=True, text=True) |
| 24 | return result.stdout.strip() |
| 25 | |
| 26 | |
| 27 | def test_strict_lock_reports_unsupported_without_os_link(tmp_path: Path) -> None: |
no test coverage detected