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

Function lstat

tests/async_lock/test_acquire.py:246–249  ·  view source on GitHub ↗
(path: str, *, dir_fd: int | None = None)

Source from the content-addressed store, hash-verified

244 lstat_threads: set[int] = set()
245
246 def lstat(path: str, *, dir_fd: int | None = None) -> os.stat_result:
247 if os.fspath(path) == lock.lock_file:
248 lstat_threads.add(threading.get_ident())
249 return real_lstat(path, dir_fd=dir_fd)
250
251 mocker.patch("os.lstat", side_effect=lstat, autospec=True)
252 await lock.acquire()

Calls 1

addMethod · 0.80

Tested by

no test coverage detected