Check getfuncargnames for methods defined with functools.partial (#5701)
()
| 74 | |
| 75 | |
| 76 | def test_getfuncargnames_partial(): |
| 77 | """Check getfuncargnames for methods defined with functools.partial (#5701)""" |
| 78 | import functools |
| 79 | |
| 80 | def check(arg1, arg2, i): |
| 81 | raise NotImplementedError() |
| 82 | |
| 83 | class T: |
| 84 | test_ok = functools.partial(check, i=2) |
| 85 | |
| 86 | values = getfuncargnames(T().test_ok, name="test_ok") |
| 87 | assert values == ("arg1", "arg2") |
| 88 | |
| 89 | |
| 90 | def test_getfuncargnames_staticmethod_partial(): |
nothing calls this directly
no test coverage detected