Home | History | Annotate | Download | only in test

Lines Matching full:pack

19     struct.pack('q', 5)
37 # SF bug 1530559. struct.pack raises TypeError where it used
41 got = struct.pack(format, number)
46 expected = struct.pack(format, int(number))
50 self.assertEqual((struct.pack('=i', 1)[0] == chr(0)), ISBIGENDIAN)
64 self.assertRaises(struct.error, struct.pack, 'iii', 3)
65 self.assertRaises(struct.error, struct.pack, 'i', 3, 3, 3)
66 self.assertRaises((TypeError, struct.error), struct.pack, 'i', 'foo')
67 self.assertRaises((TypeError, struct.error), struct.pack, 'P', 'foo')
69 s = struct.pack('ii', 1, 2)
86 s = struct.pack(format, c, b, h, i, l, f, d, t)
143 res = struct.pack(xfmt, arg)
213 def test_one(self, x, pack=struct.pack,
234 # Pack work?
235 got = pack(format, x)
246 # x is out of range -- verify pack realizes that.
248 pack, format, x)
295 # to pack as integers. That is assuming the implemented
314 struct.pack, self.format,
317 struct.pack, self.format,
322 struct.pack(self.format, 3+42j)
330 got = struct.pack(self.format, nonint)
335 expected = struct.pack(self.format, int(nonint))
342 struct.pack(format, obj)
344 self.fail("integer code pack failed on object "
351 struct.pack, self.format,
375 got = struct.pack(code, input)
393 packed = struct.pack("<f", smaller)
398 bigpacked = struct.pack(">f", smaller)
406 packed = struct.pack(">f", big)
413 self.assertRaises(OverflowError, struct.pack, ">f", big)
416 # SF bug 1530559. struct.pack raises TypeError where it used to convert.
516 packedFalse = struct.pack(falseFormat, *false)
520 packedTrue = struct.pack(trueFormat, *true)
531 packed = struct.pack(prefix+'?', 1)
539 self.assertRaises(IOError, struct.pack, prefix + '?',
547 self.assertRaises(MemoryError, struct.pack, "357913941c", "a")