#!/usr/bin/env python3
"""
Test script for the inpainter MCP server inpaint tool.
"""
import sys
from pathlib import Path

# Add the mcp module to path
sys.path.insert(0, str(Path(__file__).parent.parent))

from mcp.servers.inpainter_server import inpaint

def test_inpaint():
    # Use test data
    image_path = "test_data/0000000165.png"
    image_path = "test_data/0000000932.png"
    mask_path = "artifacts/tmp/output_person_17_0cae3b4264_mask.png"
    mask_path = "artifacts/tmp/output_person_01_fa5907f7ec_mask.png"
    prompt = "A walking person, full-body, red jeans, blue shirt."

    if not Path(image_path).exists():
        print(f"Test image not found: {image_path}")
        return

    if not Path(mask_path).exists():
        print(f"Test mask not found: {mask_path}")
        return

    result = inpaint(image_path, mask_path, prompt)
    print("Inpaint result:", result)

if __name__ == "__main__":
    test_inpaint()