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 cc44b8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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
9 changes: 7 additions & 2 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 Down

0 comments on commit cc44b8e

Please sign in to comment.