"""tools/pipeline_list.py on made-up game folders: records folded once, a key whose shader the folder's answers do not name left out, --mesh-only, a folder of another record layout left out, the file read back, and what tools/prepare_shaders.py takes from a list for its seed. Also tools/check_content.py refusing such files in a commit. No game files; stdlib only. Run: python tests/pipeline_list_test.py """ import hashlib import struct import sys import tempfile import unittest from pathlib import Path ROOT = Path(__file__).resolve().parent.parent sys.path.insert(0, str(ROOT / 'tools')) import check_content # noqa: E402 import pipeline_list as pl # noqa: E402 REC = 464 # a KeyRec of the runtime that wrote the test's files: three ids, two flags, the state VS, FS, TS, MS = 0, 4, 6, 7 def h(seed): return hashlib.sha256(seed.encode()).digest() def answer(seed, stage, salt=0): """A shader-answers.bin record: stage, code hash, input id, 147 bytes of answers, the pad byte.""" return struct.pack('