MCPcopy
hub / github.com/pytest-dev/pytest / test_getfuncargnames_staticmethod_partial

Function test_getfuncargnames_staticmethod_partial

testing/python/fixtures.py:120–131  ·  view source on GitHub ↗

Check getfuncargnames for staticmethods defined with functools.partial (#5701)

()

Source from the content-addressed store, hash-verified

118
119
120def 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")

Callers

nothing calls this directly

Calls 2

getfuncargnamesFunction · 0.90
TClass · 0.70

Tested by

no test coverage detected