text fitting pro feature

This commit is contained in:
2025-10-10 14:41:18 +02:00
parent 0edf324335
commit 596f640912
23 changed files with 909 additions and 86 deletions

View File

@@ -2,14 +2,6 @@
import pytest
from unittest.mock import Mock, patch, MagicMock
import sys
from pathlib import Path
# Add src to path for imports
src_path = Path(__file__).parent.parent.parent.parent / "src"
sys.path.insert(0, str(src_path))
from core.generation_engine import generate_texture_image
class TestGenerateTextureImageControlFlow:
@@ -49,8 +41,11 @@ class TestGenerateTextureImageControlFlow:
mock_props.enable_text_fitting = False
mock_props.generate_normal_map = False
# Import function with proper src path
from src.core.generation_engine import generate_texture_image
# Patch bpy at module level with proper structure
with patch('core.generation_engine.bpy') as mock_bpy:
with patch('src.core.generation_engine.bpy') as mock_bpy:
# Properly structure the bpy mock
mock_images = Mock()
mock_images.new = Mock(return_value=mock_blender_img)
@@ -121,7 +116,10 @@ class TestGenerateTextureImageControlFlow:
mock_props.enable_text_fitting = False
mock_props.generate_normal_map = False
with patch('core.generation_engine.bpy') as mock_bpy:
# Import function with proper src path
from src.core.generation_engine import generate_texture_image
with patch('src.core.generation_engine.bpy') as mock_bpy:
# Properly structure the bpy mock
mock_images = Mock()
mock_images.new = Mock(return_value=mock_blender_img)