MCPcopy Create free account
hub / github.com/tox-dev/filelock / _python_without_links

Function _python_without_links

tests/test_public_api.py:20–24  ·  view source on GitHub ↗
(script: str, *args: Path)

Source from the content-addressed store, hash-verified

18
19
20def _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
27def test_strict_lock_reports_unsupported_without_os_link(tmp_path: Path) -> None:

Calls 1

runMethod · 0.45

Tested by

no test coverage detected