Files
2026-03-12 21:05:35 +01:00

28 lines
670 B
Python

from PIL import Image, ImageDraw
from pathlib import Path
import shutil
from patch_editor import main
def create_dummy_images():
work_dir = Path('/tmp/work')
work_dir.mkdir(parents=True, exist_ok=True)
img1 = Image.new('RGBA', (100, 100), color='white')
img2 = Image.new('RGBA', (100, 100), color='white')
draw = ImageDraw.Draw(img2)
draw.rectangle([20, 20, 40, 40], fill='blue')
img1.save(work_dir / 'a.png')
img2.save(work_dir / 'a-patch.png')
if __name__ == "__main__":
create_dummy_images()
try:
main()
print("Test completed successfully.")
except Exception as e:
print(f"Test failed: {e}")