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

Function _init_then_fork

tests/test_read_write_unit.py:606–615  ·  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

604 original_init = _Sub.__init__
605
606 def _init_then_fork(
607 self: _Sub,
608 lock_file: str | os.PathLike[str],
609 timeout: float = -1,
610 *,
611 blocking: bool = True,
612 is_singleton: bool = True,
613 ) -> None:
614 original_init(self, lock_file, timeout, blocking=blocking, is_singleton=is_singleton)
615 pid_box[0] += 1
616
617 mocker.patch.object(_Sub, "__init__", _init_then_fork)
618

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected