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

Class Col

Lib/test/test_collections.py:1086–1092  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1084 self.assertIsSubclass(Sequence, Collection)
1085 # Check direct subclassing
1086 class Col(Collection):
1087 def __iter__(self):
1088 return iter(list())
1089 def __len__(self):
1090 return 0
1091 def __contains__(self, item):
1092 return False
1093 class DerCol(Col): pass
1094 self.assertEqual(list(iter(Col())), [])
1095 self.assertNotIsSubclass(list, Col)

Callers 1

test_CollectionMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_CollectionMethod · 0.68