Check getfuncargnames for staticmethods defined with functools.partial (#5701)
()
| 88 | |
| 89 | |
| 90 | def test_getfuncargnames_staticmethod_partial(): |
| 91 | """Check getfuncargnames for staticmethods defined with functools.partial (#5701)""" |
| 92 | import functools |
| 93 | |
| 94 | def check(arg1, arg2, i): |
| 95 | raise NotImplementedError() |
| 96 | |
| 97 | class T: |
| 98 | test_ok = staticmethod(functools.partial(check, i=2)) |
| 99 | |
| 100 | values = getfuncargnames(T().test_ok, name="test_ok") |
| 101 | assert values == ("arg1", "arg2") |
| 102 | |
| 103 | |
| 104 | @pytest.mark.pytester_example_path("fixtures/fill_fixtures") |
nothing calls this directly
no test coverage detected