Beispiel #1
0
def mock_plugin(mocker):
    name = "mock_plugin"
    info = "useful"
    mocker.patch("mock_plugin.init")
    mocker.patch("mock_plugin.cleanup")
    plugins._load_plugin(name, info, os.path.abspath("."))
    plugins.cleanup()
    yield plugins._loaded_plugins[name], info
    del plugins._loaded_plugins[name]
Beispiel #2
0
def main() -> int:
    """Run startup and the Qt main loop."""
    args = setup_pre_app(sys.argv[1:])
    qapp = app.Application()
    crash_handler.CrashHandler(qapp)
    setup_post_app(args)
    _logger.debug("Startup completed, starting Qt main loop")
    returncode = qapp.exec_()
    plugins.cleanup()
    _logger.debug("Exiting with status %d", returncode)
    return returncode
Beispiel #3
0
def mock_plugin():
    name = "mock_plugin"
    plugins._load_plugin(name, os.path.abspath("."))
    plugins.cleanup()
    yield plugins._loaded_plugins[name]
    del plugins._loaded_plugins[name]