Exemple #1
0
 def test_roundtrip(self):
     obj= numpy.zeros(10)
     src = pickler.PickleDumpBlob(obj)
     actual = yield pickler.loads_from_blob(src)
     self.assertTrue(numpy.array_equal(obj, actual))
Exemple #2
0
 def test_list(self):
     src = blob.StringBlob(pickle.dumps(["test",42], pickle.HIGHEST_PROTOCOL))
     actual = yield pickler.loads_from_blob(src)
     self.assertEqual(["test",42], actual)