mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
OP-2042 - added functionality to implicit choose variant
If APP_VARIANT is empty it looks for latest installed variant of an application
This commit is contained in:
parent
d55d996f9c
commit
d0ada90e44
4 changed files with 23 additions and 15 deletions
|
|
@ -26,16 +26,15 @@ class TestPublishInMaya(PublishTest):
|
|||
{OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests ../tests/integration/hosts/maya # noqa: E501
|
||||
|
||||
"""
|
||||
PERSIST = True
|
||||
PERSIST = False
|
||||
|
||||
TEST_FILES = [
|
||||
("1BTSIIULJTuDc8VvXseuiJV_fL6-Bu7FP", "test_maya_publish.zip", "")
|
||||
]
|
||||
|
||||
APP = "maya"
|
||||
APP_VARIANT = "2019"
|
||||
|
||||
APP_NAME = "{}/{}".format(APP, APP_VARIANT)
|
||||
# keep empty to locate latest installed variant or explicit
|
||||
APP_VARIANT = ""
|
||||
|
||||
TIMEOUT = 120 # publish timeout
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,8 @@ class TestPublishInNuke(PublishTest):
|
|||
]
|
||||
|
||||
APP = "nuke"
|
||||
APP_VARIANT = "12-2"
|
||||
|
||||
APP_NAME = "{}/{}".format(APP, APP_VARIANT)
|
||||
# keep empty to locate latest installed variant or explicit
|
||||
APP_VARIANT = ""
|
||||
|
||||
TIMEOUT = 120 # publish timeout
|
||||
|
||||
|
|
|
|||
|
|
@ -24,16 +24,15 @@ class TestPublishInPhotoshop(PublishTest):
|
|||
{OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests ../tests/integration/hosts/photoshop # noqa: E501
|
||||
|
||||
"""
|
||||
PERSIST = True
|
||||
PERSIST = False
|
||||
|
||||
TEST_FILES = [
|
||||
("1zD2v5cBgkyOm_xIgKz3WKn8aFB_j8qC-", "test_photoshop_publish.zip", "")
|
||||
]
|
||||
|
||||
APP = "photoshop"
|
||||
APP_VARIANT = "2021"
|
||||
|
||||
APP_NAME = "{}/{}".format(APP, APP_VARIANT)
|
||||
# keep empty to locate latest installed variant or explicit
|
||||
APP_VARIANT = ""
|
||||
|
||||
TIMEOUT = 120 # publish timeout
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ import glob
|
|||
from tests.lib.db_handler import DBHandler
|
||||
from tests.lib.file_handler import RemoteFileHandler
|
||||
|
||||
from openpype.lib.remote_publish import find_variant_key
|
||||
|
||||
|
||||
class BaseTest:
|
||||
"""Empty base test class"""
|
||||
|
|
@ -173,12 +175,15 @@ class PublishTest(ModuleUnitTest):
|
|||
"""
|
||||
|
||||
APP = ""
|
||||
APP_VARIANT = ""
|
||||
|
||||
APP_NAME = "{}/{}".format(APP, APP_VARIANT)
|
||||
APP_VARIANT = "" # keep empty to locate latest installed variant
|
||||
|
||||
TIMEOUT = 120 # publish timeout
|
||||
|
||||
@property
|
||||
def app_name(self):
|
||||
if self.APP_VARIANT:
|
||||
return "{}/{}".format(self.APP, self.APP_VARIANT)
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def last_workfile_path(self, download_test_data):
|
||||
raise NotImplementedError
|
||||
|
|
@ -224,7 +229,13 @@ class PublishTest(ModuleUnitTest):
|
|||
"task_name": self.TASK
|
||||
}
|
||||
|
||||
yield application_manager.launch(self.APP_NAME, **data)
|
||||
variant = self.APP_VARIANT
|
||||
if not variant:
|
||||
variant = find_variant_key(application_manager, self.APP)
|
||||
|
||||
app_name = "{}/{}".format(self.APP, variant)
|
||||
|
||||
yield application_manager.launch(app_name, **data)
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def publish_finished(self, dbcon, launched_app, download_test_data):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue