#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:00:49 +02:00
parent 4bf21e28df
commit 4988ca5c55
1 changed files with 2 additions and 0 deletions

View File

@ -171,6 +171,8 @@ class TestDefaultDict(unittest.TestCase):
finally: finally:
os.remove(tfn) os.remove(tfn)
def test_callable_arg(self):
self.assertRaises(TypeError, defaultdict, {})
def test_main(): def test_main():
test_support.run_unittest(TestDefaultDict) test_support.run_unittest(TestDefaultDict)