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