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

Class CounterSubclassWithSetItem

Lib/test/test_collections.py:2043–2050  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2041################################################################################
2042
2043class CounterSubclassWithSetItem(Counter):
2044 # Test a counter subclass that overrides __setitem__
2045 def __init__(self, *args, **kwds):
2046 self.called = False
2047 Counter.__init__(self, *args, **kwds)
2048 def __setitem__(self, key, value):
2049 self.called = True
2050 Counter.__setitem__(self, key, value)
2051
2052class CounterSubclassWithGet(Counter):
2053 # Test a counter subclass that overrides get()

Callers 1

test_helper_functionMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_helper_functionMethod · 0.68