def test_import_recipe(self): """ Verifies we can dynamically import a recipe without warnings. """ p4a_root_dir = os.path.dirname(os.path.dirname(__file__)) name = 'pythonforandroid.recipes.python3' pathname = os.path.join(*([p4a_root_dir] + name.split('.') + ['__init__.py'])) with warnings.catch_warnings(record=True) as recorded_warnings: warnings.simplefilter("always") module = import_recipe(name, pathname) assert module is not None assert recorded_warnings == []
def test_import_recipe(self): """ Verifies we can dynamically import a recipe without warnings. """ p4a_root_dir = os.path.dirname(os.path.dirname(__file__)) name = 'pythonforandroid.recipes.python3' pathname = os.path.join( *([p4a_root_dir] + name.split('.') + ['__init__.py']) ) with warnings.catch_warnings(record=True) as recorded_warnings: warnings.simplefilter("always") module = import_recipe(name, pathname) assert module is not None assert recorded_warnings == []