From 4988ca5c5559383122b345ba32657a1ab66f7320 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Thu, 8 Dec 2011 00:00:49 +0200 Subject: [PATCH] #13531: add a test for defaultdict with a non-callable arg. Patch by Mike Cheng. --- Lib/test/test_defaultdict.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_defaultdict.py b/Lib/test/test_defaultdict.py index a524ad7909..3d760b9ffb 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) -- 2.50.1