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

Function _init_then_fork

tests/sqlite/test_lock_settings.py:177–186  ·  view source on GitHub ↗
(
        self: _Sub,
        lock_file: str | os.PathLike[str],
        timeout: float = -1,
        *,
        blocking: bool = True,
        is_singleton: bool = True,
    )

Source from the content-addressed store, hash-verified

175 original_init = _Sub.__init__
176
177 def _init_then_fork(
178 self: _Sub,
179 lock_file: str | os.PathLike[str],
180 timeout: float = -1,
181 *,
182 blocking: bool = True,
183 is_singleton: bool = True,
184 ) -> None:
185 original_init(self, lock_file, timeout, blocking=blocking, is_singleton=is_singleton)
186 pid_box[0] += 1
187
188 mocker.patch.object(_Sub, "__init__", _init_then_fork)
189

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected