diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_descr.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 962c1cc..d7a0644 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -2340,6 +2340,14 @@ def str_of_str_subclass(): vereq(capture.getvalue(), '41\n41\n') capture.close() +def kwdargs(): + if verbose: print "Testing keyword arguments to __init__, __call__..." + def f(a): return a + vereq(f.__call__(a=42), 42) + a = [] + list.__init__(a, sequence=[0, 1, 2]) + vereq(a, [0, 1, 2]) + def test_main(): class_docstrings() lists() @@ -2389,6 +2397,7 @@ def test_main(): subclasspropagation() buffer_inherit() str_of_str_subclass() + kwdargs() if verbose: print "All OK" if __name__ == "__main__": |