1 2 3 4 5 6 7 8 9 10 11 12 13 14
from . import mixins class ExportedModules(mixins.PythonNamespaceWalker): target_namespace = "snakeoil" def test__all__accuracy(self): failures = [] for module in self.walk_namespace(self.target_namespace): for target in getattr(module, "__all__", ()): if not hasattr(module, target): failures.append((module, target)) assert not failures, f"nonexistent __all__ targets spotted: {failures}"