Back to index

python3.2  3.2.2
Public Member Functions
test.test_itertools.SubclassWithKwargsTest Class Reference

List of all members.

Public Member Functions

def test_keywords_in_subclass

Detailed Description

Definition at line 1442 of file

Member Function Documentation

Definition at line 1443 of file

01444     def test_keywords_in_subclass(self):
01445         # count is not subclassable...
01446         for cls in (repeat, zip, filter, filterfalse, chain, map,
01447                     starmap, islice, takewhile, dropwhile, cycle, compress):
01448             class Subclass(cls):
01449                 def __init__(self, newarg=None, *args):
01450                     cls.__init__(self, *args)
01451             try:
01452                 Subclass(newarg=1)
01453             except TypeError as err:
01454                 # we expect type errors because of wrong argument count
01455                 self.assertNotIn("does not take keyword arguments", err.args[0])

Here is the call graph for this function:

The documentation for this class was generated from the following file: