MCPcopy Index your code
hub / github.com/python/cpython / test_total

Method test_total

Lib/test/test_collections.py:2159–2161  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2157 self.assertRaises(TypeError, Counter.__init__)
2158
2159 def test_total(self):
2160 c = Counter(a=10, b=5, c=0)
2161 self.assertEqual(c.total(), 15)
2162
2163 def test_order_preservation(self):
2164 # Input order dictates items() order

Callers

nothing calls this directly

Calls 3

totalMethod · 0.95
CounterClass · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected