From 899482c0af7094781a0263b4a91e1b2e1a7d65d9 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 11 Aug 2023 11:17:38 +0200 Subject: [PATCH] Add automated targets for tests (#5443) Without it plugins with 'automated' targets won't be triggered (eg `CloseAE` etc.) --- openpype/pipeline/context_tools.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openpype/pipeline/context_tools.py b/openpype/pipeline/context_tools.py index 9ada2d42a4..f567118062 100644 --- a/openpype/pipeline/context_tools.py +++ b/openpype/pipeline/context_tools.py @@ -21,6 +21,7 @@ from openpype.client import ( from openpype.lib.events import emit_event from openpype.modules import load_modules, ModulesManager from openpype.settings import get_project_settings +from openpype.tests.lib import is_in_tests from .publish.lib import filter_pyblish_plugins from .anatomy import Anatomy @@ -142,6 +143,10 @@ def install_host(host): else: pyblish.api.register_target("local") + if is_in_tests(): + print("Registering pyblish target: automated") + pyblish.api.register_target("automated") + project_name = os.environ.get("AVALON_PROJECT") host_name = os.environ.get("AVALON_APP")