Kaydet (Commit) facd0a34 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Strengthen one of the collections.Counter() tests

üst 07573d7b
...@@ -1080,8 +1080,10 @@ class TestCounter(unittest.TestCase): ...@@ -1080,8 +1080,10 @@ class TestCounter(unittest.TestCase):
# test fidelity to the pure python version # test fidelity to the pure python version
c = CounterSubclassWithSetItem('abracadabra') c = CounterSubclassWithSetItem('abracadabra')
self.assertTrue(c.called) self.assertTrue(c.called)
self.assertEqual(dict(c), {'a': 5, 'b': 2, 'c': 1, 'd': 1, 'r':2 })
c = CounterSubclassWithGet('abracadabra') c = CounterSubclassWithGet('abracadabra')
self.assertTrue(c.called) self.assertTrue(c.called)
self.assertEqual(dict(c), {'a': 5, 'b': 2, 'c': 1, 'd': 1, 'r':2 })
################################################################################ ################################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment