]> granicus.if.org Git - python/commitdiff
Add tests for __init__() and update() with no args.
authorRaymond Hettinger <python@rcn.com>
Wed, 14 Jan 2009 01:15:06 +0000 (01:15 +0000)
committerRaymond Hettinger <python@rcn.com>
Wed, 14 Jan 2009 01:15:06 +0000 (01:15 +0000)
Lib/test/test_collections.py

index 80ee2c58b1015912dbf9bfaefa3cfaba43ac50fb..13ae9bf7135fd10681db106efdfed7b55deb4710 100644 (file)
@@ -396,8 +396,10 @@ class TestCounter(unittest.TestCase):
         self.assertRaises(TypeError, hash, c)
         c.update(dict(a=5, b=3, c=1))
         c.update(Counter('a' * 50 + 'b' * 30))
+        c.update()          # test case with no args
         c.__init__('a' * 500 + 'b' * 300)
         c.__init__('cdc')
+        c.__init__()
         self.assertEqual(c, dict(a=555, b=333, c=3, d=1))
         self.assertEqual(c.setdefault('d', 5), 1)
         self.assertEqual(c['d'], 1)