| 2050 | Counter.__setitem__(self, key, value) |
| 2051 | |
| 2052 | class 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 | |
| 2061 | class TestCounter(unittest.TestCase): |
| 2062 |
no outgoing calls