MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / round_trip_pickle

Method round_trip_pickle

test/test_bson.py:1383–1389  ·  view source on GitHub ↗
(self, obj, pickled_with_older)

Source from the content-addressed store, hash-verified

1381 )
1382
1383 def round_trip_pickle(self, obj, pickled_with_older):
1384 pickled_with_older_obj = pickle.loads(pickled_with_older)
1385 for protocol in range(pickle.HIGHEST_PROTOCOL + 1):
1386 pkl = pickle.dumps(obj, protocol=protocol)
1387 obj2 = pickle.loads(pkl)
1388 self.assertEqual(obj, obj2)
1389 self.assertEqual(pickled_with_older_obj, obj2)
1390
1391 def test_regex_pickling(self):
1392 reg = Regex(".?")

Callers 6

test_regex_picklingMethod · 0.95
test_dbref_picklingMethod · 0.95
test_minkey_picklingMethod · 0.95
test_maxkey_picklingMethod · 0.95
test_int64_picklingMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected