mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge develop
This commit is contained in:
parent
6405700ed9
commit
669a2256ef
248 changed files with 13531 additions and 8058 deletions
|
|
@ -24,6 +24,11 @@ def pytest_addoption(parser):
|
|||
help="Overwrite default timeout"
|
||||
)
|
||||
|
||||
parser.addoption(
|
||||
"--setup_only", action="store", default=None,
|
||||
help="True - only setup test, do not run any tests"
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def test_data_folder(request):
|
||||
|
|
@ -45,6 +50,11 @@ def timeout(request):
|
|||
return request.config.getoption("--timeout")
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def setup_only(request):
|
||||
return request.config.getoption("--setup_only")
|
||||
|
||||
|
||||
@pytest.hookimpl(tryfirst=True, hookwrapper=True)
|
||||
def pytest_runtest_makereport(item, call):
|
||||
# execute all other hooks to obtain the report object
|
||||
|
|
|
|||
|
|
@ -71,12 +71,30 @@ class TestDeadlinePublishInNuke(NukeDeadlinePublishTestClass):
|
|||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "representation", 4))
|
||||
|
||||
additional_args = {"context.subset": "workfileTest_task",
|
||||
"context.ext": "nk"}
|
||||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "representation", 1,
|
||||
additional_args=additional_args))
|
||||
|
||||
additional_args = {"context.subset": "renderTest_taskMain",
|
||||
"context.ext": "exr"}
|
||||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "representation", 1,
|
||||
additional_args=additional_args))
|
||||
|
||||
additional_args = {"context.subset": "renderTest_taskMain",
|
||||
"name": "thumbnail"}
|
||||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "representation", 1,
|
||||
additional_args=additional_args))
|
||||
|
||||
additional_args = {"context.subset": "renderTest_taskMain",
|
||||
"name": "h264_mov"}
|
||||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "representation", 1,
|
||||
additional_args=additional_args))
|
||||
|
||||
assert not any(failures)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class TestPublishInNuke(NukeLocalPublishTestClass):
|
|||
!!!
|
||||
It expects modified path in WriteNode,
|
||||
use '[python {nuke.script_directory()}]' instead of regular root
|
||||
dir (eg. instead of `c:/projects/test_project/test_asset/test_task`).
|
||||
dir (eg. instead of `c:/projects`).
|
||||
Access file path by selecting WriteNode group, CTRL+Enter, update file
|
||||
input
|
||||
!!!
|
||||
|
|
@ -70,12 +70,30 @@ class TestPublishInNuke(NukeLocalPublishTestClass):
|
|||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "representation", 4))
|
||||
|
||||
additional_args = {"context.subset": "workfileTest_task",
|
||||
"context.ext": "nk"}
|
||||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "representation", 1,
|
||||
additional_args=additional_args))
|
||||
|
||||
additional_args = {"context.subset": "renderTest_taskMain",
|
||||
"context.ext": "exr"}
|
||||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "representation", 1,
|
||||
additional_args=additional_args))
|
||||
|
||||
additional_args = {"context.subset": "renderTest_taskMain",
|
||||
"name": "thumbnail"}
|
||||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "representation", 1,
|
||||
additional_args=additional_args))
|
||||
|
||||
additional_args = {"context.subset": "renderTest_taskMain",
|
||||
"name": "h264_mov"}
|
||||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "representation", 1,
|
||||
additional_args=additional_args))
|
||||
|
||||
assert not any(failures)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -243,6 +243,8 @@ class PublishTest(ModuleUnitTest):
|
|||
PERSIST = True # True - keep test_db, test_openpype, outputted test files
|
||||
TEST_DATA_FOLDER = None # use specific folder of unzipped test file
|
||||
|
||||
SETUP_ONLY = False
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def app_name(self, app_variant):
|
||||
"""Returns calculated value for ApplicationManager. Eg.(nuke/12-2)"""
|
||||
|
|
@ -286,8 +288,13 @@ class PublishTest(ModuleUnitTest):
|
|||
|
||||
@pytest.fixture(scope="module")
|
||||
def launched_app(self, dbcon, download_test_data, last_workfile_path,
|
||||
startup_scripts, app_args, app_name, output_folder_url):
|
||||
startup_scripts, app_args, app_name, output_folder_url,
|
||||
setup_only):
|
||||
"""Launch host app"""
|
||||
if setup_only or self.SETUP_ONLY:
|
||||
print("Creating only setup for test, not launching app")
|
||||
yield
|
||||
return
|
||||
# set schema - for integrate_new
|
||||
from openpype import PACKAGE_DIR
|
||||
# Path to OpenPype's schema
|
||||
|
|
@ -316,8 +323,12 @@ class PublishTest(ModuleUnitTest):
|
|||
|
||||
@pytest.fixture(scope="module")
|
||||
def publish_finished(self, dbcon, launched_app, download_test_data,
|
||||
timeout):
|
||||
timeout, setup_only):
|
||||
"""Dummy fixture waiting for publish to finish"""
|
||||
if setup_only or self.SETUP_ONLY:
|
||||
print("Creating only setup for test, not launching app")
|
||||
yield False
|
||||
return
|
||||
import time
|
||||
time_start = time.time()
|
||||
timeout = timeout or self.TIMEOUT
|
||||
|
|
@ -334,11 +345,16 @@ class PublishTest(ModuleUnitTest):
|
|||
|
||||
def test_folder_structure_same(self, dbcon, publish_finished,
|
||||
download_test_data, output_folder_url,
|
||||
skip_compare_folders):
|
||||
skip_compare_folders,
|
||||
setup_only):
|
||||
"""Check if expected and published subfolders contain same files.
|
||||
|
||||
Compares only presence, not size nor content!
|
||||
"""
|
||||
if setup_only or self.SETUP_ONLY:
|
||||
print("Creating only setup for test, not launching app")
|
||||
return
|
||||
|
||||
published_dir_base = output_folder_url
|
||||
expected_dir_base = os.path.join(download_test_data,
|
||||
"expected")
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ class TestPipelinePublishPlugins(TestPipeline):
|
|||
}
|
||||
|
||||
# load plugin function for testing
|
||||
plugin = publish_plugins.ExtractorColormanaged()
|
||||
plugin = publish_plugins.ColormanagedPyblishPluginMixin()
|
||||
plugin.log = log
|
||||
config_data, file_rules = plugin.get_colorspace_settings(context)
|
||||
|
||||
|
|
@ -175,14 +175,14 @@ class TestPipelinePublishPlugins(TestPipeline):
|
|||
}
|
||||
|
||||
# load plugin function for testing
|
||||
plugin = publish_plugins.ExtractorColormanaged()
|
||||
plugin = publish_plugins.ColormanagedPyblishPluginMixin()
|
||||
plugin.log = log
|
||||
plugin.set_representation_colorspace(
|
||||
representation_nuke, context,
|
||||
colorspace_settings=(config_data_nuke, file_rules_nuke)
|
||||
)
|
||||
# load plugin function for testing
|
||||
plugin = publish_plugins.ExtractorColormanaged()
|
||||
plugin = publish_plugins.ColormanagedPyblishPluginMixin()
|
||||
plugin.log = log
|
||||
plugin.set_representation_colorspace(
|
||||
representation_hiero, context,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue