()
| 95 | |
| 96 | |
| 97 | def 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 | |
| 120 | def test_takes_multiple_arguments(): |
nothing calls this directly
no test coverage detected