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

Function read_proc

tests/conftest.py:257–259  ·  view source on GitHub ↗
(path: Path, **_: str | None)

Source from the content-addressed store, hash-verified

255 assert sys.platform != "win32" # narrows os.geteuid for the type checker
256
257 def read_proc(path: Path, **_: str | None) -> str:
258 assert path == Path("/proc/sys/kernel/overflowuid")
259 return str(os.geteuid())
260
261 mocker.patch("filelock._filesystem._ownership._linux_owner_probe", autospec=True, return_value=lambda _fd: False)
262 mocker.patch.object(Path, "read_text", autospec=True, side_effect=read_proc)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected