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

Function delayed_fstat

tests/test_fork_ownership.py:177–182  ·  view source on GitHub ↗
(fd: int)

Source from the content-addressed store, hash-verified

175 real_fstat = os.fstat
176
177 def delayed_fstat(fd: int) -> os.stat_result:
178 if threading.current_thread() is worker and not entered.is_set():
179 descriptors.append(fd)
180 entered.set()
181 proceed.wait()
182 return real_fstat(fd)
183
184 mocker.patch("os.fstat", side_effect=delayed_fstat)
185

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected