MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_splittable_pop

Method test_splittable_pop

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

Source from the content-addressed store, hash-verified

1018
1019 @support.cpython_only
1020 def test_splittable_pop(self):
1021 a, b = self.make_shared_key_dict(2)
1022
1023 a.pop('y')
1024 with self.assertRaises(KeyError):
1025 a.pop('y')
1026
1027 self.assertEqual(list(a), ['x', 'z'])
1028 self.assertEqual(list(b), ['x', 'y', 'z'])
1029
1030 # Two dicts have different insertion order.
1031 a['y'] = 42
1032 self.assertEqual(list(a), ['x', 'z', 'y'])
1033 self.assertEqual(list(b), ['x', 'y', 'z'])
1034
1035 @support.cpython_only
1036 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