def test_parse_truncated(self): self.assertEqual(0x01020304, parse_truncated(b'\1\2\3\4')) self.assertEqual(0xdeadbeef & 0x7fffffff, parse_truncated(b'\xde\xad\xbe\xef'))
def test_parse_truncated(self): self.assertEqual(0x01020304, parse_truncated(b"\1\2\3\4")) self.assertEqual(0xDEADBEEF & 0x7FFFFFFF, parse_truncated(b"\xde\xad\xbe\xef"))