Refactor tests and remove unused imports
- Cleaned up test files by removing unnecessary imports and unused parameters. - Simplified test functions by eliminating redundant parameterization and consolidating logic. - Updated test cases to directly use defined values instead of parameterized inputs where applicable. - Enhanced readability and maintainability of the test code across various test files.
This commit is contained in:
@@ -1,17 +1,11 @@
|
||||
import bpy
|
||||
import pytest
|
||||
from tests.support.paths import PROJECT_ROOT
|
||||
from tools.nodes.groups.image_layer import build_image_layer_group
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def image_layer(request):
|
||||
def image_layer():
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
if getattr(request, "param", "definition") == "asset":
|
||||
with bpy.data.libraries.load(str(PROJECT_ROOT / "src/anyimage/assets/O_AnyImage.blend")) as (_, target):
|
||||
target.node_groups = ["O Image Layer"]
|
||||
group = target.node_groups[0]
|
||||
else:
|
||||
group = build_image_layer_group()
|
||||
group = build_image_layer_group()
|
||||
yield group
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
|
||||
Reference in New Issue
Block a user