"""Unit tests for tools/fspx_unpack.py (the FSPX payloads of the FidelityFX DLL's shader containers) and for the translator's FSPX sidecar reads (rdna2spirv.native_blob / cs_dispatch_state). python -I tests/test_fspx_unpack.py Zero game data: every payload and container is built here from synthetic bytes. """ import contextlib import io import json import os import struct import subprocess import sys import tempfile import unittest ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) TOOL = os.path.join(ROOT, "tools", "fspx_unpack.py") sys.path.insert(0, os.path.join(ROOT, "tools")) import fspx_unpack # noqa: E402 ENDPGM = struct.pack("