"""tools/instance_lists.py: a list block whose struct the schema doesn't describe is counted, not a crash. python -I tests/test_instance_lists_schema_gap.py Synthetic bytes only (the resource builder of tests/test_instance_lists.py). """ import os import struct import sys import tempfile import unittest import zlib HERE = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, HERE) sys.path.insert(0, os.path.join(os.path.dirname(HERE), "tools")) import instance_lists as il # noqa: E402 from test_instance_lists import resource # noqa: E402 def without_prop_struct(): """The fixture with the prop-list struct renamed in the schema; its block still names PROP_LIST.""" V, P = resource() V = bytearray(V) st = 0x100 + 32 * list(il.STRUCT_SIZE).index(il.PROP_LIST) assert struct.unpack_from("