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

more tests for callargs

parent 7b7094c3
...@@ -90,8 +90,21 @@ __doc__ = u""" ...@@ -90,8 +90,21 @@ __doc__ = u"""
>>> test_int_kwargs(h) >>> test_int_kwargs(h)
Traceback (most recent call last): Traceback (most recent call last):
TypeError: h() keywords must be strings 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): def e(*args, **kwargs):
print len(args), len(kwargs) print len(args), len(kwargs)
......
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