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

@@ -238,10 +238,6 @@ def extract_selection_contours(selection_values, max_resolution=512, threshold=0
image_size=source_size,
)
POINT_SPACING = 0.1
def contour_area(points):
import numpy as np
@@ -560,19 +556,6 @@ def crop_plane_bounds(source_object, crop_bounds, source_size):
)
def extract_cutout_contours(
content_values,
sampling_resolution,
threshold=CUTOUT_ALPHA_THRESHOLD,
):
contour_resolution = max(512, min(round(sampling_resolution * 8), 1024))
return extract_selection_contours(
content_values,
max_resolution=contour_resolution,
threshold=threshold,
)
def effective_cutout_edge_length(
context,
source_object,