"""Reject loader-fixture drift before asking native code to touch guest RAM.""" import importlib from pathlib import Path import platform import struct import tempfile import unittest mapped = importlib.import_module('mapped-image-differential') class MachOFramingTests(unittest.TestCase): def test_truncated_command_is_rejected(self): header = struct.pack('<8I', 0xfeedfacf, 0x100000c, 0, 2, 1, 8, 0, 0) with self.assertRaisesRegex(AssertionError, 'bad load-command length'): mapped.commands(header + struct.pack('