()
| 970 | |
| 971 | |
| 972 | def test_accepted_arg_count(): |
| 973 | from nvidia.dali._utils.external_source_impl import accepted_arg_count |
| 974 | |
| 975 | def fun_zero(): |
| 976 | pass |
| 977 | |
| 978 | def fun_one(a): |
| 979 | pass |
| 980 | |
| 981 | class MethodZero: |
| 982 | def __call__(self): |
| 983 | pass |
| 984 | |
| 985 | class MethodOne: |
| 986 | def __call__(self, a): |
| 987 | pass |
| 988 | |
| 989 | assert accepted_arg_count(fun_zero) == 0 |
| 990 | assert accepted_arg_count(fun_one) == 1 |
| 991 | assert accepted_arg_count(MethodZero()) == 0 |
| 992 | assert accepted_arg_count(MethodOne()) == 1 |
nothing calls this directly
no test coverage detected