Skip to content

Commit

Permalink
Test adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
CyclingNinja committed May 30, 2024
1 parent b43937d commit fe34214
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion glue/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
11 changes: 8 additions & 3 deletions glue/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -41,4 +46,4 @@ def test_list_plugins():
load_plugins(require_qt_plugins=False)
plugins = list_plugins()
assert isinstance(plugins, list)
assert len(plugins) == 14
assert len(plugins) == 5

0 comments on commit fe34214

Please sign in to comment.