def test_find_public_symbols(): """ find_public finds all non underscored symbols """ mod = _types.ModuleType('lala') mod.a = 1 mod._b = 2 assert_equals(_util.find_public(vars(mod)), ['a'])
def test_find_public_all(): """ find_public passes __all__ """ mod = _types.ModuleType('lala') mod.__all__ = ['_b', 'c'] assert_equals(_util.find_public(vars(mod)), ['_b', 'c'])
# pylint: disable = redefined-builtin # pylint: disable = wildcard-import from tdi._exceptions import * # noqa del reraise # noqa from .markup import factory as _factory #: Version of the TDI package #: #: :Type: `tdi.util.Version` version = _version.Version(*__version__) #: HTML Template factory #: #: :Type: `tdi.factory.Factory` html = _factory.html #: XML Template factory #: #: :Type: `tdi.factory.Factory` xml = _factory.xml #: Text Template factory #: #: :Type: `tdi.factory.Factory` text = _factory.text __all__ = _util.find_public(globals()) del _factory from tdi import _deprecations # noqa