#13531: add a test for defaultdict with a non-callable arg. Patch by Mike Cheng.

This commit is contained in:
Ezio Melotti 2011-12-08 00:02:00 +02:00
parent 2f0ad742b5
commit eb5879414d
1 changed files with 3 additions and 0 deletions

View 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]