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

Method test_dict_dematerialization

Lib/test/test_opcache.py:1236–1246  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1234 self.assertEqual(c.__dict__, {"a":1, "b": 2})
1235
1236 def test_dict_dematerialization(self):
1237 c = C()
1238 c.a = 1
1239 c.b = 2
1240 c.__dict__
1241 for _ in range(_testinternalcapi.SPECIALIZATION_THRESHOLD):
1242 c.a
1243 self.assertEqual(
1244 _testinternalcapi.get_object_dict_values(c),
1245 (1, 2, '<NULL>')
1246 )
1247
1248 def test_dict_dematerialization_multiple_refs(self):
1249 c = C()

Callers

nothing calls this directly

Calls 2

CClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected