Test getfuncargnames for normal functions
()
| 15 | |
| 16 | |
| 17 | def 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 | |
| 41 | def test_getfuncargnames_methods(): |
nothing calls this directly
no test coverage detected