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

Function test_coverage

dali/test/python/test_dali_cpu_only.py:1690–1706  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1688
1689
1690def test_coverage():
1691 methods = module_functions(
1692 fn, remove_prefix="nvidia.dali.fn", allowed_private_modules=["_conditional"]
1693 )
1694 methods += module_functions(dmath, remove_prefix="nvidia.dali")
1695 exclude = "|".join(
1696 [
1697 "(^" + x.replace(".", r"\.").replace("*", ".*").replace("?", ".") + "$)"
1698 for x in excluded_methods
1699 ]
1700 )
1701 exclude = re.compile(exclude)
1702 methods = [x for x in methods if not exclude.match(x)]
1703 # we are fine with covering more we can easily list, like numba
1704 assert set(methods).difference(set(tested_methods)) == set(), "Test doesn't cover:\n {}".format(
1705 set(methods) - set(tested_methods)
1706 )

Callers

nothing calls this directly

Calls 2

module_functionsFunction · 0.90
matchMethod · 0.80

Tested by

no test coverage detected