Lines Matching refs:pack_into
430 s.pack_into(writable_buf, 0, test_string)
435 s.pack_into(writable_buf, 10, test_string)
441 self.assertRaises((ValueError, struct.error), s.pack_into, small_buf, 0,
443 self.assertRaises((ValueError, struct.error), s.pack_into, small_buf, 2,
448 self.assertRaises((TypeError, struct.error), struct.pack_into, b'', sb,
455 pack_into = lambda *args: struct.pack_into(fmt, *args)
458 pack_into(writable_buf, 0, test_string)
463 pack_into(writable_buf, 10, test_string)
469 self.assertRaises((ValueError, struct.error), pack_into, small_buf, 0,
471 self.assertRaises((ValueError, struct.error), pack_into, small_buf, 2,
538 self.assertRaises(struct.error, struct.pack_into, '12345', store, 0)
544 self.assertRaises(struct.error, struct.pack_into, 'c12345', store, 0,
553 self.assertRaises(struct.error, struct.pack_into, '14s42', store, 0,
587 r'pack_into requires a buffer of at least 6 '
592 struct.pack_into('b', bytearray(1), 5, 1)
607 struct.pack_into('<I', byte_list, -2, 123)
612 struct.pack_into('<B', byte_list, -11, 123)
627 r'pack_into requires a buffer of at least ' + str(sys.maxsize + 4) +
632 struct.pack_into('<I', bytearray(10), sys.maxsize, 1)