assert theEmptySet is EmptySet() assert theEmptySequence is EmptySequence() assert theEmptyThree is EmptyThree() if 1: #tmp assert not issubclass(EmptyMapping, Mapping) #MappingView.register(EmptyMapping) KeysView.register(EmptySet) ItemsView.register(EmptySet) ValuesView.register(EmptyCollection) assert issubclass(EmptySet, KeysView) assert issubclass(EmptySet, ItemsView) assert issubclass(EmptySet, Set) assert issubclass(EmptySet, MappingView) assert issubclass(EmptyCollection, ValuesView) assert issubclass(EmptyCollection, Collection) assert issubclass(EmptyCollection, MappingView) Mapping.register(EmptyMapping) Set.register(EmptySet) Sequence.register(EmptySequence) assert issubclass(EmptyMapping, Mapping)
def _abc_itemsview_register(view_cls): ItemsView.register(view_cls)