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:
2026-09-17 10:02:05 +08:00
parent ac7f5a7f6d
commit 0aeb61f818
22 changed files with 95 additions and 372 deletions

View File

@@ -6,7 +6,6 @@ from tests.support.materials import image_layer
from tools.nodes.groups.image_depth_layer import build_image_depth_layer_group
@pytest.mark.parametrize("image_layer", ["definition", "asset"], indirect=True)
def test_alpha_curve_preserves_endpoints_and_suppresses_soft_edges(image_layer):
inputs = {
item.name: item for item in image_layer.interface.items_tree
@@ -16,7 +15,6 @@ def test_alpha_curve_preserves_endpoints_and_suppresses_soft_edges(image_layer):
"Color", "Alpha", "Normal", "Normal Scale", "Bump Scale",
"Alpha Fix", "Object Space",
]
strength = inputs["Alpha Fix"]
output = next(node for node in image_layer.nodes if node.type == "GROUP_OUTPUT")
curve = output.inputs["Alpha"].links[0].from_node
assert curve.type == "CURVE_FLOAT"