From cc44b8e04a0770281fd99eeb598f092d1505223b Mon Sep 17 00:00:00 2001 From: CyclingNinja Date: Thu, 30 May 2024 10:01:50 +0100 Subject: [PATCH] Test adjustments --- glue/main.py | 2 +- glue/tests/test_main.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/glue/main.py b/glue/main.py index 63fa2b279..d32aca234 100644 --- a/glue/main.py +++ b/glue/main.py @@ -59,7 +59,7 @@ def load_plugins(splash=None, require_qt_plugins=False, plugins_to_load=None): n_plugins = len(plugins_to_require) for i_plugin, item in enumerate(list(iter_plugin_entry_points())): - if item.module in plugins_to_require: + if item.module in plugins_to_load: if item.module not in _installed_plugins: _installed_plugins.add(item.name) diff --git a/glue/tests/test_main.py b/glue/tests/test_main.py index 4744005e4..52228c149 100644 --- a/glue/tests/test_main.py +++ b/glue/tests/test_main.py @@ -13,8 +13,13 @@ def test_load_plugins(capsys): with patch.object(logger, 'info') as info: load_plugins() - plugin = [call[0][0] for call in info.call_args_list] - assert False + # plugins = [call[0][0] for call in info.call_args_list if ('succeeded' or 'loaded') in call[0][0]] + plugins = [] + for acall in info.call_args_list: + if ('loaded' or 'succeeded') in acall[0][0]: + plugins.append(acall[0][0]) + + assert len(plugins) == 5 def test_no_duplicate_loading(capsys):