]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#13531: add a test for defaultdict with a non-callable arg. Patch by Mike Cheng.
authorEzio Melotti <ezio.melotti@gmail.com>
Wed, 7 Dec 2011 22:02:00 +0000 (00:02 +0200)
committerEzio Melotti <ezio.melotti@gmail.com>
Wed, 7 Dec 2011 22:02:00 +0000 (00:02 +0200)
Lib/test/test_defaultdict.py

index da2608a54836ce05dca3326eaf0bd2d1d9216e18..532d535981b36c1efbbea0c2dd4cd6ede7caffef 100644 (file)
@@ -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]