From: Ezio Melotti Date: Wed, 7 Dec 2011 22:02:00 +0000 (+0200) Subject: #13531: add a test for defaultdict with a non-callable arg. Patch by Mike Cheng. X-Git-Tag: v3.2.3rc1~305 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eb5879414dd76f9b1ad4cac5114387951fbbf153;p=thirdparty%2FPython%2Fcpython.git #13531: add a test for defaultdict with a non-callable arg. Patch by Mike Cheng. --- diff --git a/Lib/test/test_defaultdict.py b/Lib/test/test_defaultdict.py index da2608a54836..532d535981b3 100644 --- a/Lib/test/test_defaultdict.py +++ b/Lib/test/test_defaultdict.py @@ -172,6 +172,9 @@ class TestDefaultDict(unittest.TestCase): finally: os.remove(tfn) + def test_callable_arg(self): + self.assertRaises(TypeError, defaultdict, {}) + def test_pickleing(self): d = defaultdict(int) d[1]