Add comprehensive tests for edge depth extension, empty image edits, and material view adaptation

- Introduced `test_edge_depth.py` to validate the functionality of edge depth extension, ensuring core alpha preservation, proper depth handling, and edge padding behavior.
- Created `test_empty_image_edits.py` to verify the behavior of image edits in Blender, focusing on shared edits, preservation of image properties, and handling of failed operations.
- Developed `test_material_view_adaptation.py` to test material adaptation preferences, ensuring color space and alpha settings are correctly applied and preserved across various scenarios.
This commit is contained in:
2026-09-06 21:43:47 +08:00
parent 1994d38ccd
commit 7e55af6722
58 changed files with 3607 additions and 200 deletions

View File

@@ -55,13 +55,13 @@ def test_failed_empty_replacement_restores_blending_and_timing():
original = SimpleNamespace(name="Original", use_fake_user=False, users=1)
timing = SimpleNamespace(frame_start=3, frame_offset=2, frame_duration=7, use_cyclic=True)
source = SimpleNamespace(data=original, use_empty_image_alpha=False, image_user=timing)
result = SimpleNamespace(source="SEQUENCE")
result = SimpleNamespace(source="SEQUENCE", users=1)
def fail_configuration(*args, **kwargs):
timing.frame_start = 99
raise RuntimeError("Failed configuration")
with patch.object(images, "video_total_frames", return_value=3), patch.object(
with patch.object(images, "has_other_image_empty", return_value=True), patch.object(images, "video_total_frames", return_value=3), patch.object(
images, "configure_image_user", side_effect=fail_configuration
):
with pytest.raises(RuntimeError, match="Failed configuration"):