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

Class CounterSubclassWithGet

Lib/test/test_collections.py:2052–2059  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2050 Counter.__setitem__(self, key, value)
2051
2052class CounterSubclassWithGet(Counter):
2053 # Test a counter subclass that overrides get()
2054 def __init__(self, *args, **kwds):
2055 self.called = False
2056 Counter.__init__(self, *args, **kwds)
2057 def get(self, key, default):
2058 self.called = True
2059 return Counter.get(self, key, default)
2060
2061class TestCounter(unittest.TestCase):
2062

Callers 1

test_helper_functionMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_helper_functionMethod · 0.68