Check getfuncargnames for staticmethods defined with functools.partial (#5701)
()
| 118 | |
| 119 | |
| 120 | def test_getfuncargnames_staticmethod_partial(): |
| 121 | """Check getfuncargnames for staticmethods defined with functools.partial (#5701)""" |
| 122 | import functools |
| 123 | |
| 124 | def check(arg1, arg2, i): |
| 125 | raise NotImplementedError() |
| 126 | |
| 127 | class T: |
| 128 | test_ok = staticmethod(functools.partial(check, i=2)) |
| 129 | |
| 130 | values = getfuncargnames(T().test_ok, name="test_ok") |
| 131 | assert values == ("arg1", "arg2") |
| 132 | |
| 133 | |
| 134 | @pytest.mark.pytester_example_path("fixtures/fill_fixtures") |
nothing calls this directly
no test coverage detected