mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
Branch with newly implemented DL tests is targetted to release 3.15, but changes from it affects tests in develop. This branch should solve issues with automatic tests in develop without need of full release 3.15 changes.
52 lines
1.9 KiB
Python
52 lines
1.9 KiB
Python
import os
|
|
import pytest
|
|
import shutil
|
|
|
|
from tests.lib.testing_classes import (
|
|
HostFixtures,
|
|
PublishTest,
|
|
)
|
|
|
|
|
|
class MayaHostFixtures(HostFixtures):
|
|
@pytest.fixture(scope="module")
|
|
def last_workfile_path(self, download_test_data, output_folder_url):
|
|
"""Get last_workfile_path from source data.
|
|
|
|
Maya expects workfile in proper folder, so copy is done first.
|
|
"""
|
|
src_path = os.path.join(download_test_data,
|
|
"input",
|
|
"workfile",
|
|
"test_project_test_asset_test_task_v001.mb")
|
|
dest_folder = os.path.join(output_folder_url,
|
|
self.PROJECT,
|
|
self.ASSET,
|
|
"work",
|
|
self.TASK)
|
|
os.makedirs(dest_folder)
|
|
dest_path = os.path.join(dest_folder,
|
|
"test_project_test_asset_test_task_v001.mb")
|
|
shutil.copy(src_path, dest_path)
|
|
|
|
yield dest_path
|
|
|
|
@pytest.fixture(scope="module")
|
|
def startup_scripts(self, monkeypatch_session, download_test_data):
|
|
"""Points Maya to userSetup file from input data"""
|
|
startup_path = os.path.join(download_test_data,
|
|
"input",
|
|
"startup")
|
|
original_pythonpath = os.environ.get("PYTHONPATH")
|
|
monkeypatch_session.setenv("PYTHONPATH",
|
|
"{}{}{}".format(startup_path,
|
|
os.pathsep,
|
|
original_pythonpath))
|
|
|
|
@pytest.fixture(scope="module")
|
|
def skip_compare_folders(self):
|
|
yield []
|
|
|
|
|
|
class MayaLocalPublishTestClass(MayaHostFixtures, PublishTest):
|
|
"""Testing class for local publishes."""
|