Skip to content

Commit

Permalink
'Refactored by Sourcery'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourcery AI committed Sep 12, 2021
1 parent d171cb9 commit 97bb5ee
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions glotaran/testing/plugin_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ def _monkeypatch_plugin_registry(
monkeypatch_plugin_registry_data_io
monkeypatch_plugin_registry_project_io
"""
initila_plugins = {}
if create_new_registry is False:
initila_plugins = __PluginRegistry.__dict__[register_name]
if test_registry is not None:
initila_plugins = (
__PluginRegistry.__dict__[register_name]
if not create_new_registry
else {}
)

with mock.patch.object(
__PluginRegistry, register_name, {**initila_plugins, **test_registry}
):
Expand Down

0 comments on commit 97bb5ee

Please sign in to comment.