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

Method test_regex_pickling

test/test_bson.py:1391–1399  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1389 self.assertEqual(pickled_with_older_obj, obj2)
1390
1391 def test_regex_pickling(self):
1392 reg = Regex(".?")
1393 pickled_with_3 = (
1394 b"\x80\x04\x959\x00\x00\x00\x00\x00\x00\x00\x8c\n"
1395 b"bson.regex\x94\x8c\x05Regex\x94\x93\x94)\x81\x94}"
1396 b"\x94(\x8c\x07pattern\x94\x8c\x02.?\x94\x8c\x05flag"
1397 b"s\x94K\x00ub."
1398 )
1399 self.round_trip_pickle(reg, pickled_with_3)
1400
1401 def test_timestamp_pickling(self):
1402 ts = Timestamp(0, 1)

Callers

nothing calls this directly

Calls 2

round_trip_pickleMethod · 0.95
RegexClass · 0.90

Tested by

no test coverage detected