"""Synthetic tests for tools/audio_config.py (no game data).""" import json import os import struct import subprocess import sys import tempfile import tracemalloc import unittest from unittest.mock import patch ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) TOOL = os.path.join(ROOT, "tools", "audio_config.py") sys.path.insert(0, os.path.join(ROOT, "tools")) import audio_config as A # noqa: E402 import hashdict # noqa: E402 def make_record(config_id, duration_ms, hash_a=0x11111111, hash_b=0x22222222, tail=b"\x00" * 22): """One 46-byte record: duration, then the marker block at +4.""" b = bytearray(46) struct.pack_into("