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

Function test_getfuncargnames_partial

testing/python/fixtures.py:106–117  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

104""",
105)
106def 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
120def test_getfuncargnames_staticmethod_partial():

Callers

nothing calls this directly

Calls 2

getfuncargnamesFunction · 0.90
TClass · 0.70

Tested by

no test coverage detected