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

Class MyMapping

Lib/test/test_collections.py:1848–1854  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1846 self.assertIsSubclass(sample, Mapping)
1847 self.validate_abstract_methods(Mapping, '__iter__', '__len__', '__getitem__')
1848 class MyMapping(Mapping):
1849 def __len__(self):
1850 return 0
1851 def __getitem__(self, i):
1852 raise IndexError
1853 def __iter__(self):
1854 return iter(())
1855 self.validate_comparison(MyMapping())
1856 self.assertRaises(TypeError, reversed, MyMapping())
1857

Callers 1

test_MappingMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_MappingMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…