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

Function _pypy_fork_script

tests/test_read_write_fork.py:855–874  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

853
854
855def _pypy_fork_script() -> str: # pragma: pypy cover
856 return textwrap.dedent(
857 """
858 from __future__ import annotations
859
860 import os
861 import sys
862
863 from filelock import ReadWriteLock
864
865 child_path = sys.argv[1]
866 child_pid = os.fork()
867 if child_pid == 0:
868 with ReadWriteLock(child_path, is_singleton=False).read_lock():
869 pass
870 sys.exit(0)
871 _, status = os.waitpid(child_pid, 0)
872 assert os.waitstatus_to_exitcode(status) == 0
873 """
874 )
875
876
877def _pypy_external_sqlite_script() -> str: # pragma: pypy cover

Calls

no outgoing calls

Tested by

no test coverage detected