diff --git a/jigsaw/PluginLoader.py b/jigsaw/PluginLoader.py index 3fac09a..ce2ef71 100644 --- a/jigsaw/PluginLoader.py +++ b/jigsaw/PluginLoader.py @@ -275,4 +275,13 @@ def unload_plugin(self, name: str) -> None: manifest = self.get_manifest(name) self._manifests.remove(manifest) - self._logger.debug("{} unloaded.".format(name)) \ No newline at end of file + self._logger.debug("{} unloaded.".format(name)) + + def quickload(self, *args): + """ + Loads all manifests, loads all plugins, and then enables all plugins + :param args: The args to pass to the plugin + """ + self.load_manifests() + self.load_plugins(args) + self.enable_all_plugins() diff --git a/setup.py b/setup.py index 618fe9e..29791d6 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="Jigsaw", - version="3.0.0", + version="3.1.0", packages=["jigsaw", ], license="MIT", description="A plugin framework for Python3.6+", diff --git a/tests/test_jigsaw.py b/tests/test_jigsaw.py index bb0d46d..6500934 100644 --- a/tests/test_jigsaw.py +++ b/tests/test_jigsaw.py @@ -196,3 +196,8 @@ def test_reload_all_manifests(): j.load_manifests() j.reload_all_manifests() assert j.get_manifest("Basic Test") is not None + +def test_quickload(): + j = jigsaw.PluginLoader((os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "plugins")),)) + j.quickload() + assert j.get_plugin_loaded("Basic Test")