Commit 0cd778f2 authored by Robert Bradshaw's avatar Robert Bradshaw

more tests for callargs

parent 7b7094c3
......@@ -90,8 +90,21 @@ __doc__ = u"""
>>> test_int_kwargs(h)
Traceback (most recent call last):
TypeError: h() keywords must be strings
>>> d()
Traceback (most recent call last):
TypeError: d() takes at least 1 positional argument (0 given)
>>> d(1)
1 1 0 0
>>> d(1,2)
1 2 0 0
>>> d(1,2,3)
1 2 1 0
"""
def d(a, b=1, *args, **kwds):
print a, b, len(args), len(kwds)
def e(*args, **kwargs):
print len(args), len(kwargs)
......@@ -103,7 +116,7 @@ def g(**kwargs):
def h(a, b, c, *args, **kwargs):
print a, b, c, u'*', len(args), len(kwargs)
args = (9,8,7)
import sys
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment