MCPcopy Create free account
hub / github.com/dask/dask / test_getargspec

Function test_getargspec

dask/tests/test_utils.py:98–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96
97
98def test_getargspec():
99 def func(x, y):
100 pass
101
102 assert getargspec(func).args == ["x", "y"]
103
104 func2 = functools.partial(func, 2)
105 # this is a bit of a lie, but maybe close enough
106 assert getargspec(func2).args == ["x", "y"]
107
108 def wrapper(*args, **kwargs):
109 pass
110
111 wrapper.__wrapped__ = func
112 assert getargspec(wrapper).args == ["x", "y"]
113
114 class MyType:
115 def __init__(self, x, y):
116 pass
117
118 assert getargspec(MyType).args == ["self", "x", "y"]
119
120
121def test_takes_multiple_arguments():

Callers

nothing calls this directly

Calls 1

getargspecFunction · 0.90

Tested by

no test coverage detected