import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
from checkout.service import calculate_checkout

subtotal = 100.0
coupon = "SAVE10"
expected = 97.20
result = calculate_checkout(subtotal, coupon)
print(f"input subtotal={subtotal:.2f} coupon={coupon}")
print(f"expected_total={expected:.2f}")
print(f"observed_total={result.total:.2f}")
print(f"discount={result.discount:.2f} taxable_base={result.taxable_base:.2f} tax={result.tax:.2f}")
print("MATCH" if result.total == expected else "MISMATCH")
