monkeypatch_plugin_registry

glotaran.testing.plugin_system.monkeypatch_plugin_registry(*, test_megacomplex: MutableMapping[str, type[Megacomplex]] | None = None, test_data_io: MutableMapping[str, DataIoInterface] | None = None, test_project_io: MutableMapping[str, ProjectIoInterface] | None = None, create_new_registry: bool = False) Generator[None, None, None][source]

Contextmanager to monkeypatch multiple plugin registries at once.

Parameters:
  • test_megacomplex (MutableMapping[str, type[Megacomplex]], optional) – Registry to to update or replace the Megacomplex registry with. , by default None

  • test_data_io (MutableMapping[str, DataIoInterface], optional) – Registry to to update or replace the DataIoInterface registry with. , by default None

  • test_project_io (MutableMapping[str, ProjectIoInterface], optional) – Registry to to update or replace the ProjectIoInterface registry with. , by default None

  • create_new_registry (bool) – Whether to update the actual registry or create a new one from the arguments. , by default False

Yields:

Generator[None, None, None] – Just keeps all context manager alive