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

Method test_dict_missing

Lib/test/test_collections.py:75–81  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

73 self._copy_test(obj)
74
75 def test_dict_missing(self):
76 class A(UserDict):
77 def __missing__(self, key):
78 return 456
79 self.assertEqual(A()[123], 456)
80 # get() ignores __missing__ on dict
81 self.assertIs(A().get(123), None)
82
83
84################################################################################

Callers

nothing calls this directly

Calls 4

AClass · 0.70
assertEqualMethod · 0.45
assertIsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected