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

Function test_getfuncargnames_functions

testing/python/fixtures.py:21–42  ·  view source on GitHub ↗

Test getfuncargnames for normal functions

()

Source from the content-addressed store, hash-verified

19
20
21def test_getfuncargnames_functions():
22 """Test getfuncargnames for normal functions"""
23
24 def f():
25 raise NotImplementedError()
26
27 assert not getfuncargnames(f)
28
29 def g(arg):
30 raise NotImplementedError()
31
32 assert getfuncargnames(g) == ("arg",)
33
34 def h(arg1, arg2="hello"):
35 raise NotImplementedError()
36
37 assert getfuncargnames(h) == ("arg1",)
38
39 def j(arg1, arg2, arg3="hello"):
40 raise NotImplementedError()
41
42 assert getfuncargnames(j) == ("arg1", "arg2")
43
44
45def test_getfuncargnames_methods():

Callers

nothing calls this directly

Calls 1

getfuncargnamesFunction · 0.90

Tested by

no test coverage detected