key-data / models /tests /deep_dive_interface.py
tostido's picture
Update tests to target gen42 and remove gen52
4bfd01e
"""Deep dive into champion's advanced capabilities."""
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import champion_gen42 as champ
import os
import tempfile
print("=" * 70)
print("🎮 EXPORT_INTERFACE - Self-Spawning HTTP Server")
print("=" * 70)
# Create temp directory for interface export
output_dir = tempfile.mkdtemp(prefix="champion_interface_")
print(f"Output dir: {output_dir}")
try:
result = champ.export_interface(output_dir)
print(f"Result: {result}")
# List what was created
print("\nGenerated files:")
for f in os.listdir(output_dir):
filepath = os.path.join(output_dir, f)
size = os.path.getsize(filepath)
print(f" {f} ({size} bytes)")
# Show content of small files
if size < 5000:
print(f" --- Content of {f} ---")
with open(filepath, 'r') as file:
content = file.read()
print(content[:2000])
print(" ---")
except Exception as e:
print(f"Error: {e}")
import traceback
traceback.print_exc()