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

Function test_coverage

dali/test/python/test_dali_variable_batch_size.py:1998–2014  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1996
1997
1998def test_coverage():
1999 methods = module_functions(
2000 fn, remove_prefix="nvidia.dali.fn", allowed_private_modules=["_conditional"]
2001 )
2002 methods += module_functions(dmath, remove_prefix="nvidia.dali")
2003 exclude = "|".join(
2004 [
2005 "(^" + x.replace(".", "\\.").replace("*", ".*").replace("?", ".") + "$)"
2006 for x in excluded_methods
2007 ]
2008 )
2009 exclude = re.compile(exclude)
2010 methods = [x for x in methods if not exclude.match(x)]
2011 # we are fine with covering more we can easily list, like numba
2012 assert set(methods).difference(set(tested_methods)) == set(), "Test doesn't cover:\n {}".format(
2013 set(methods) - set(tested_methods)
2014 )

Callers

nothing calls this directly

Calls 2

module_functionsFunction · 0.90
matchMethod · 0.80

Tested by

no test coverage detected