function arguments parse
This commit is contained in:
@@ -34,3 +34,29 @@ def test_return():
|
||||
2 : a + 1
|
||||
"""
|
||||
''')
|
||||
|
||||
|
||||
|
||||
|
||||
def test_args():
|
||||
|
||||
@Commentor("<return>")
|
||||
def target(a, d=1, *b, c, k=1):
|
||||
return a + k
|
||||
|
||||
asserteq_or_print(target(1, 2, 3, 4, c=5, k=2), '''
|
||||
def target(a, d=1, *b, c, k=1):
|
||||
"""
|
||||
1 : a
|
||||
2 : d
|
||||
(3, 4) : b
|
||||
5 : c
|
||||
2 : k
|
||||
"""
|
||||
return a + k
|
||||
"""
|
||||
1 : a
|
||||
2 : k
|
||||
3 : a + k
|
||||
"""
|
||||
''')
|
||||
|
||||
Reference in New Issue
Block a user