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

Function _file_header

tests/sqlite/test_connection_schema.py:61–72  ·  view source on GitHub ↗
(page_count: int)

Source from the content-addressed store, hash-verified

59
60
61def _file_header(page_count: int) -> bytes:
62 # Rollback journal format, a matching change counter and version-valid-for, so SQLite trusts the page count.
63 return struct.pack(
64 ">16sH6B12I20s2I",
65 b"SQLite format 3\0",
66 _PAGE_SIZE,
67 *(1, 1, 0, 64, 32, 32),
68 *(1, page_count, 0, 0, 1, 4, 0, 0, 1, 0, 0, 0),
69 b"",
70 1,
71 3040001,
72 )
73
74
75@pytest.mark.parametrize("mode", [pytest.param("read", id="read"), pytest.param("write", id="write")])

Calls

no outgoing calls

Tested by

no test coverage detected