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

Method test_splittable_pop

Lib/test/test_dict.py:1017–1030  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1015
1016 @support.cpython_only
1017 def test_splittable_pop(self):
1018 a, b = self.make_shared_key_dict(2)
1019
1020 a.pop('y')
1021 with self.assertRaises(KeyError):
1022 a.pop('y')
1023
1024 self.assertEqual(list(a), ['x', 'z'])
1025 self.assertEqual(list(b), ['x', 'y', 'z'])
1026
1027 # Two dicts have different insertion order.
1028 a['y'] = 42
1029 self.assertEqual(list(a), ['x', 'z', 'y'])
1030 self.assertEqual(list(b), ['x', 'y', 'z'])
1031
1032 @support.cpython_only
1033 def test_splittable_pop_pending(self):

Callers

nothing calls this directly

Calls 5

make_shared_key_dictMethod · 0.95
listClass · 0.85
popMethod · 0.45
assertRaisesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected