MCPcopy Index your code
hub / github.com/python/cpython / test_pickling

Method test_pickling

Lib/test/test_defaultdict.py:143–149  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

141 self.assertRaises(TypeError, defaultdict, {})
142
143 def test_pickling(self):
144 d = defaultdict(int)
145 d[1]
146 for proto in range(pickle.HIGHEST_PROTOCOL + 1):
147 s = pickle.dumps(d, proto)
148 o = pickle.loads(s)
149 self.assertEqual(d, o)
150
151 def test_union(self):
152 i = defaultdict(int, {1: 1, 2: 2})

Callers

nothing calls this directly

Calls 4

defaultdictClass · 0.85
dumpsMethod · 0.45
loadsMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected