[Python-checkins] r68604 - python/trunk/Lib/test/test_collections.py

raymond.hettinger python-checkins at python.org
Wed Jan 14 02:15:06 CET 2009


Author: raymond.hettinger
Date: Wed Jan 14 02:15:06 2009
New Revision: 68604
Log:
Add tests for __init__() and update() with no args.
Modified:
 python/trunk/Lib/test/test_collections.py
Modified: python/trunk/Lib/test/test_collections.py
==============================================================================
--- python/trunk/Lib/test/test_collections.py	(original)
+++ python/trunk/Lib/test/test_collections.py	Wed Jan 14 02:15:06 2009
@@ -396,8 +396,10 @@
 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)


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /