aboutsummaryrefslogtreecommitdiff
blob: 5a564eca82c65d0a221283a45e0334c6bc199de7 (plain)
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, "nonexistent __all__ targets spotted: %s" % (failures,)