Test getfuncargnames for normal functions
()
| 19 | |
| 20 | |
| 21 | def 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 | |
| 45 | def test_getfuncargnames_methods(): |
nothing calls this directly
no test coverage detected