testing: abstracting legacy_io fixture to lib for other pipeline tests

This commit is contained in:
Jakub Jezek 2023-01-04 21:32:40 +01:00
parent b361bcba2e
commit a429352964
No known key found for this signature in database
GPG key ID: 730D7C02726179A7
2 changed files with 16 additions and 8 deletions

View file

@ -0,0 +1,13 @@
import pytest
from tests.lib.testing_classes import ModuleUnitTest
from openpype.pipeline import legacy_io
class TestPipeline(ModuleUnitTest):
""" Testing Pipeline base class
"""
@pytest.fixture(scope="module")
def legacy_io(self, dbcon):
legacy_io.Session = dbcon.Session
yield legacy_io.Session

View file

@ -17,11 +17,11 @@ import pytest
import shutil
import os
from tests.lib.testing_classes import ModuleUnitTest
from openpype.pipeline import colorspace, legacy_io
from tests.unit.openpype.pipeline.lib import TestPipeline
from openpype.pipeline import colorspace
class TestPipelineColorspace(ModuleUnitTest):
class TestPipelineColorspace(TestPipeline):
""" Testing Colorspace
Example:
@ -37,11 +37,6 @@ class TestPipelineColorspace(ModuleUnitTest):
)
]
@pytest.fixture(scope="module")
def legacy_io(self, dbcon):
legacy_io.Session = dbcon.Session
yield legacy_io.Session
@pytest.fixture(scope="module")
def config_path_project(
self,