| 46 | """Test getfuncargnames for normal methods""" |
| 47 | |
| 48 | class A: |
| 49 | def f(self, arg1, arg2="hello"): |
| 50 | raise NotImplementedError() |
| 51 | |
| 52 | def g(self, /, arg1, arg2="hello"): |
| 53 | raise NotImplementedError() |
| 54 | |
| 55 | def h(self, *, arg1, arg2="hello"): |
| 56 | raise NotImplementedError() |
| 57 | |
| 58 | def j(self, arg1, *, arg2, arg3="hello"): |
| 59 | raise NotImplementedError() |
| 60 | |
| 61 | def k(self, /, arg1, *, arg2, arg3="hello"): |
| 62 | raise NotImplementedError() |
| 63 | |
| 64 | assert getfuncargnames(A().f) == ("arg1",) |
| 65 | assert getfuncargnames(A().g) == ("arg1",) |
no outgoing calls