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

Function test_getargspec

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

getargspecFunction · 0.90

Tested by

no test coverage detected