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

Function test_getfuncargnames_functions

testing/python/fixtures.py:17–38  ·  view source on GitHub ↗

Test getfuncargnames for normal functions

()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

getfuncargnamesFunction · 0.90

Tested by

no test coverage detected