Skip to content

Commit 7506771

Browse files
committed
Test varargs and kwargs type
1 parent 56f7011 commit 7506771

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

atest/DynamicTypesLibrary.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,7 @@ def keyword_with_def_deco(self):
7575
@deco_wraps
7676
def keyword_wrapped(self, number=1, arg=''):
7777
return number, arg
78+
79+
@keyword
80+
def varargs_and_kwargs(self, *args, **kwargs):
81+
return '%s, %s' % (args, kwargs)

utest/test_get_keyword_types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ def test_dummy_magic_method(lib):
154154
assert types is None
155155

156156

157+
def test_varargs(lib):
158+
types = lib.get_keyword_types('varargs_and_kwargs')
159+
assert types == {}
160+
161+
157162
@pytest.mark.skipif(PY2, reason='Only applicable on Python 3')
158163
def test_init_args_with_annotation(lib_types):
159164
types = lib_types.get_keyword_types('__init__')

0 commit comments

Comments
 (0)