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

Function test_getfuncargnames_partial

testing/python/fixtures.py:76–87  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

74
75
76def test_getfuncargnames_partial():
77 """Check getfuncargnames for methods defined with functools.partial (#5701)"""
78 import functools
79
80 def check(arg1, arg2, i):
81 raise NotImplementedError()
82
83 class T:
84 test_ok = functools.partial(check, i=2)
85
86 values = getfuncargnames(T().test_ok, name="test_ok")
87 assert values == ("arg1", "arg2")
88
89
90def test_getfuncargnames_staticmethod_partial():

Callers

nothing calls this directly

Calls 2

getfuncargnamesFunction · 0.90
TClass · 0.70

Tested by

no test coverage detected