()
| 1996 | |
| 1997 | |
| 1998 | def 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 | ) |
nothing calls this directly
no test coverage detected