Strengthen one of the collections.Counter() tests
authorRaymond Hettinger <python@rcn.com>
Sun, 6 Oct 2013 00:14:51 +0000 (17:14 -0700)
committerRaymond Hettinger <python@rcn.com>
Sun, 6 Oct 2013 00:14:51 +0000 (17:14 -0700)
Lib/test/test_collections.py

index ade6ee78cea33e987889eed85d6fa0631f111123..56e812070582f828ab1db52ad02cdd03680e7153 100644 (file)
@@ -1080,8 +1080,10 @@ class TestCounter(unittest.TestCase):
         # test fidelity to the pure python version
         c = CounterSubclassWithSetItem('abracadabra')
         self.assertTrue(c.called)
+        self.assertEqual(dict(c), {'a': 5, 'b': 2, 'c': 1, 'd': 1, 'r':2 })
         c = CounterSubclassWithGet('abracadabra')
         self.assertTrue(c.called)
+        self.assertEqual(dict(c), {'a': 5, 'b': 2, 'c': 1, 'd': 1, 'r':2 })
 
 
 ################################################################################