[New-bugs-announce] [issue13531] add test for defaultdict with non-callable first argument

mike c report at bugs.python.org
Mon Dec 5 12:55:23 CET 2011


New submission from mike c <coolbutuseless at gmail.com>:

Could a test be added to ./Lib/test/test_defaultdict.py to test for TypeError being thrown when the the first argument to collections.defaultdict is not callable?  

pypy does not behave the same way as CPython 2.7.2 as the problem is not covered in the testcases.

e.g.
def test_callable_arg:
    d1 = defaultdict({})
    self.assertRaises(TypeError)  # TypeError: first argument must be callable

----------
components: Tests
messages: 148868
nosy: mike.c
priority: normal
severity: normal
status: open
title: add test for defaultdict with non-callable first argument
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13531>
_______________________________________


More information about the New-bugs-announce mailing list