Check getfuncargnames for methods defined with functools.partial (#5701)
()
| 104 | """, |
| 105 | ) |
| 106 | def test_getfuncargnames_partial(): |
| 107 | """Check getfuncargnames for methods defined with functools.partial (#5701)""" |
| 108 | import functools |
| 109 | |
| 110 | def check(arg1, arg2, i): |
| 111 | raise NotImplementedError() |
| 112 | |
| 113 | class T: |
| 114 | test_ok = functools.partial(check, i=2) |
| 115 | |
| 116 | values = getfuncargnames(T().test_ok, name="test_ok") |
| 117 | assert values == ("arg1", "arg2") |
| 118 | |
| 119 | |
| 120 | def test_getfuncargnames_staticmethod_partial(): |
nothing calls this directly
no test coverage detected