summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-12-07 22:02:00 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-12-07 22:02:00 (GMT)
commiteb5879414dd76f9b1ad4cac5114387951fbbf153 (patch)
treec672ce68ed589bc924689f74b5dac1c571beb0b4 /Lib/test
parent2f0ad742b5c13d79aa4e3c2e935cfbe04f1e9a08 (diff)
downloadcpython-eb5879414dd76f9b1ad4cac5114387951fbbf153.zip
cpython-eb5879414dd76f9b1ad4cac5114387951fbbf153.tar.gz
cpython-eb5879414dd76f9b1ad4cac5114387951fbbf153.tar.bz2
#13531: add a test for defaultdict with a non-callable arg. Patch by Mike Cheng.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_defaultdict.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_defaultdict.py b/Lib/test/test_defaultdict.py
index da2608a..532d535 100644
--- a/Lib/test/test_defaultdict.py
+++ b/Lib/test/test_defaultdict.py
@@ -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]