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:
@@ -177,9 +177,8 @@ def test_cutout_boundary_smooth_defaults_to_four():
|
||||
assert (socket.min_value, socket.max_value) == (0, 16)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("triangles", [False, True])
|
||||
def test_smoothing_reduces_stairs_without_leaving_two_ring_band(triangles):
|
||||
obj, set_value = diagonal_surface(triangles)
|
||||
def test_smoothing_reduces_stairs_without_leaving_two_ring_band():
|
||||
obj, set_value = diagonal_surface(triangles=True)
|
||||
original, faces = evaluated(obj)
|
||||
boundary = boundary_neighbors(faces)
|
||||
outer = np.isclose(original[:, 0], 0) | np.isclose(original[:, 0], 2)
|
||||
@@ -223,8 +222,8 @@ def test_smoothing_without_split_moves_outline_only_within_boundary_band():
|
||||
np.testing.assert_array_equal(evaluated(obj)[0], original)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("mode", [0, 1])
|
||||
def test_smoothed_cut_shells_stay_closed_and_separate(mode):
|
||||
def test_smoothed_cut_shells_stay_closed_and_separate():
|
||||
mode = 1
|
||||
from anyimage.common.object import modifier_input_identifier, set_modifier_input
|
||||
|
||||
obj, set_value = diagonal_surface(triangles=True)
|
||||
|
||||
Reference in New Issue
Block a user