#!/usr/bin/env python3
"""Test script for Zernike extractor import."""
import sys
from pathlib import Path

# Add Atomizer root to path
atomizer_root = Path(__file__).parent.parent
sys.path.insert(0, str(atomizer_root))

print("Testing ZernikeExtractor import...")

try:
    from optimization_engine.extractors import ZernikeExtractor
    print("  Import: OK")

    import inspect
    sig = inspect.signature(ZernikeExtractor.extract_relative)
    print(f"  extract_relative signature: {sig}")

    # Check parameters
    params = list(sig.parameters.keys())
    print(f"  Parameters: {params}")

    if 'include_coefficients' in params:
        print("  include_coefficients parameter: FOUND")
    else:
        print("  include_coefficients parameter: MISSING!")
        sys.exit(1)

except Exception as e:
    print(f"  ERROR: {e}")
    import traceback
    traceback.print_exc()
    sys.exit(1)

print("\nAll tests passed!")
