From: Raymond Hettinger Date: Wed, 14 Jan 2009 01:15:06 +0000 (+0000) Subject: Add tests for __init__() and update() with no args. X-Git-Tag: v2.7a1~2291 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=afd112baef3cb8718cca724fe91910af6291577e;p=python Add tests for __init__() and update() with no args. --- diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index 80ee2c58b1..13ae9bf713 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -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)