def test_plugin_manager_load_crud_solvent(m_get_plugin_class): plugin_manager = PluginManager() plugin_manager.load_plugin("pymdmix_solvent") assert "solvent" in plugin_manager.plugins args = MDMIX_PARSER.parse_args(["solvent", "list"]) plugin: SolventPlugin = plugin_manager.plugins["solvent"] plugin.run(args) assert len(plugin.session.query(plugin.CLASS).all()) == 0
def test_plugin_manager_load_crud_plugin_template(m_get_plugin_class): plugin_manager = PluginManager() plugin_manager.load_plugin("pymdmix_plugin_template") assert "crud_plugin_template" in plugin_manager.plugins args = MDMIX_PARSER.parse_args(["crud_plugin_template", "list"]) plugin: CrudPluginTemplate = plugin_manager.plugins["crud_plugin_template"] plugin.run(args) assert len(plugin.session.query(plugin.CLASS).all()) == 0
def test_plugin_manager_load_solvent(): plugin_manager = PluginManager() plugin_manager.load_plugin("pymdmix_solvent") assert "solvent" in plugin_manager.plugins
def get_plugin_manager() -> PluginManager: plugin_manager = PluginManager(get_mdmix_parser()) plugin_manager.load_plugin("pymdmix_solvent") return plugin_manager
def get_plugin_manager(): plugin_manager = PluginManager(get_mdmix_parser()) plugin_manager.load_plugin(PLUGIN_PACKAGE) return plugin_manager
def test_load_multiple_plugins(): parser = get_mdmix_parser() plugin_manager = PluginManager(parser) plugin_manager.load_plugin("pymdmix_core") plugin_manager.load_plugin("tests.fixture_plugin") assert len(plugin_manager.plugins) == 2
def test_plugin_manager_load_plugin(): plugin_manager = PluginManager() plugin_manager.load_plugin("tests.fixture_plugin") assert "fixtureplugin" in plugin_manager.plugins
def test_plugin_manager_load_plugin_template(): plugin_manager = PluginManager() plugin_manager.load_plugin("pymdmix_plugin_template") assert "plugin_template" in plugin_manager.plugins
def test_plugin_manager_load_plugin(): plugin_manager = PluginManager() plugin_manager.load_plugin("pymdmix_project") assert "project" in plugin_manager.plugins