#!/usr/bin/env python3 """ Simple test to debug Ritz framework """ from framework import ( component, signal, Main, Div, P, Button, H1 ) @component def SimpleTest(): """Simplest possible test""" with Main(): yield P('Hello World') # Test it import json result = SimpleTest() print("Result type:", type(result)) print("Result:", result) if result: print("\n=== HTML ===") print(result.to_html()) print("\n=== IR ===") print(json.dumps(result.to_ir(), indent=2))