def test_find_public_symbols(): """ find_public finds all non underscored symbols """ mod = _types.ModuleType('lala') mod.a = 1 mod._b = 2 assert _util.find_public(vars(mod)) == ['a']
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================== GenSASchema - Static SQLAlchemy Schema Generator ================================================== GenSASchema generates static schema definitions using SQLAlchemy's inspection capabilities. """ __author__ = u"Andr\xe9 Malo" __license__ = "Apache License, Version 2.0" __version__ = '0.6.6' from gensaschema import _util from gensaschema._exceptions import * # noqa pylint: disable = redefined-builtin, wildcard-import from gensaschema._config import Config # noqa from gensaschema._schema import Schema # noqa from gensaschema._symbols import Symbols, SymbolException # noqa from gensaschema._type import Type # noqa __all__ = _util.find_public(globals())
def test_find_public_all(): """ find_public passes __all__ """ mod = _types.ModuleType('lala') mod.__all__ = ['_b', 'c'] assert _util.find_public(vars(mod)) == ['_b', 'c']