Lines Matching refs:marshal
4 import marshal
17 new = marshal.loads(marshal.dumps(sample, *extra))
21 marshal.dump(sample, f, *extra)
23 new = marshal.load(f)
44 got = marshal.loads(s)
51 got = marshal.loads(b'I\xfe\xdc\xba\x98\x76\x54\x32\x10')
53 got = marshal.loads(b'I\x01\x23\x45\x67\x89\xab\xcd\xef')
55 got = marshal.loads(b'I\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f')
57 got = marshal.loads(b'I\xf7\xe6\xd5\xc4\xb3\xa2\x91\x80')
75 s = marshal.dumps(f, 2)
76 got = marshal.loads(s)
79 s = marshal.dumps(f, 1)
80 got = marshal.loads(s)
94 self.helper(marshal.loads(marshal.dumps(s)))
106 new = marshal.loads(marshal.dumps(StopIteration))
112 new = marshal.loads(marshal.dumps(co))
119 marshal.loads(marshal.dumps(codes))
124 co1, co2 = marshal.loads(marshal.dumps((co1, co2)))
132 co = marshal.loads(marshal.dumps(co))
165 obj2 = marshal.loads(marshal.dumps(obj))
174 new = marshal.loads(marshal.dumps(b))
180 new = marshal.loads(marshal.dumps(b))
185 new = marshal.loads(marshal.dumps(a))
192 marshal.dumps([128] * 1000)
195 self.assertRaises(Exception, marshal.loads, b'0')
196 self.assertRaises(Exception, marshal.loads, b'f')
197 self.assertRaises(Exception, marshal.loads, marshal.dumps(2**65)[:-1])
201 self.assertEqual(marshal.loads(marshal.dumps(5, 0)), 5)
202 self.assertEqual(marshal.loads(marshal.dumps(5, 1)), 5)
210 marshal.loads(c)
227 run_tests(100, marshal.loads)
230 self.assertRaises(ValueError, marshal.loads, s)
249 data = marshal.dumps(head)
250 new_head = marshal.loads(data)
257 self.assertRaises(ValueError, marshal.dumps, head)
268 self.assertRaises(ValueError, marshal.dumps, subtyp())
275 marshal.dumps(testString)
280 self.assertRaises(ValueError, marshal.loads, invalid_string)
293 marshal.dump(d, f)
299 self.assertEqual(d, marshal.load(f))
309 self.assertRaises(TypeError, marshal.loads, unicode_string)
319 self.assertRaises(ValueError, marshal.load,
320 BadReader(marshal.dumps(value)))
323 data = marshal.dumps(("hello", "dolly", None))
325 self.assertRaises(EOFError, marshal.loads, data[0: i])
337 self.assertRaises(ValueError, marshal.dump, data, NullWriter())
397 s3 = marshal.dumps(sample, 3)
398 n3 = CollectObjectIDs(set(), marshal.loads(s3))
405 s2 = marshal.dumps(sample, 2)
406 n2 = CollectObjectIDs(set(), marshal.loads(s2))
454 data = marshal.dumps(code, version)
455 marshal.loads(data)
474 s = marshal.loads(marshal.dumps(self.strobj))
481 s = marshal.loads(marshal.dumps(self.strobj, 2))
492 for v in range(marshal.version + 1):
501 for v in range(marshal.version + 1):
506 self.assertEqual(marshal.loads(data), obj)
538 for v in range(marshal.version + 1):
539 data = marshal.dumps(obj, v)
554 for v in range(marshal.version + 1):
555 data = marshal.dumps(obj, v)