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:
@@ -6,17 +6,15 @@ import numpy as np
|
||||
import pytest
|
||||
from tools.nodes.groups.image_cutout import build_image_cutout_group
|
||||
from tests.support.nodes import CUTOUT_BUILDERS
|
||||
from anyimage.operators.cutout_tool.object import load_cutout_node_group
|
||||
|
||||
|
||||
from anyimage.common.object import modifier_input_identifier, set_modifier_input
|
||||
|
||||
|
||||
@pytest.mark.parametrize("source", ("definition", "asset"))
|
||||
@pytest.mark.parametrize("shape", ("SOLID", "DEPTH_SOLID"))
|
||||
def test_depth_axis_is_removed_from_cutout_options(shape, source):
|
||||
def test_depth_axis_is_removed_from_cutout_options(shape):
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
group = CUTOUT_BUILDERS[shape]() if source == "definition" else load_cutout_node_group(shape)
|
||||
group = CUTOUT_BUILDERS[shape]()
|
||||
inputs = {item.name: item for item in group.interface.items_tree
|
||||
if item.item_type == "SOCKET" and item.in_out == "INPUT"}
|
||||
assert "Depth Axis" not in inputs
|
||||
|
||||
Reference in New Issue
Block a user