"""tools/native_pso_hashes.py on hand-built DXBC containers and indexes: no game data.""" import contextlib import io import json import os import struct import sys import tempfile import unittest from unittest import mock sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "tools")) import native_pso_hashes as tool # noqa: E402 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import make_game # noqa: E402 def container(digest: bytes, other=b"") -> bytes: """A DXBC container with a HASH part (flags 0, then the digest) and an optional second part.""" parts = [b"HASH" + struct.pack("