MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_getfuncargnames_staticmethod_partial

Function test_getfuncargnames_staticmethod_partial

testing/python/fixtures.py:90–101  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

88
89
90def 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")

Callers

nothing calls this directly

Calls 2

getfuncargnamesFunction · 0.90
TClass · 0.70

Tested by

no test coverage detected