From: Ezio Melotti Date: Wed, 7 Dec 2011 22:00:49 +0000 (+0200) Subject: #13531: add a test for defaultdict with a non-callable arg. Patch by Mike Cheng. X-Git-Tag: v2.7.3rc1~260 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4988ca5c5559383122b345ba32657a1ab66f7320;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 a524ad79098a..3d760b9ffbb1 100644 --- a/Lib/test/test_defaultdict.py +++ b/Lib/test/test_defaultdict.py @@ -171,6 +171,8 @@ class TestDefaultDict(unittest.TestCase): finally: os.remove(tfn) + def test_callable_arg(self): + self.assertRaises(TypeError, defaultdict, {}) def test_main(): test_support.run_unittest(TestDefaultDict)