MCPcopy Create free account
hub / github.com/NVIDIA/DALI / test_accepted_arg_count

Function test_accepted_arg_count

dali/test/python/test_external_source_dali.py:972–992  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

970
971
972def 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

Callers

nothing calls this directly

Calls 3

accepted_arg_countFunction · 0.90
MethodZeroClass · 0.85
MethodOneClass · 0.85

Tested by

no test coverage detected