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

Class Col

Lib/test/test_collections.py:1085–1091  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

test_CollectionMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_CollectionMethod · 0.68