Commit eb587941 authored by Ezio Melotti's avatar Ezio Melotti

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

parent 2f0ad742
...@@ -172,6 +172,9 @@ class TestDefaultDict(unittest.TestCase): ...@@ -172,6 +172,9 @@ class TestDefaultDict(unittest.TestCase):
finally: finally:
os.remove(tfn) os.remove(tfn)
def test_callable_arg(self):
self.assertRaises(TypeError, defaultdict, {})
def test_pickleing(self): def test_pickleing(self):
d = defaultdict(int) d = defaultdict(int)
d[1] d[1]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment