import pytest # The Golden Dataset: Tricky customer messages paired with expected totals GOLDEN_DATASET = [ ("Calculate the total for 4 sodas at ₹40 each and 1 sack of wheat flour at ₹350.", 510), ("anna 2kg rice at ₹60/kg, 1 medimix soap at ₹40", 160), ("3 packets of milk at ₹30 each and 2 loaves of bread at ₹50 each", 190) ] @pytest.mark.parametrize("customer_message, expected_total", GOLDEN_DATASET) def test_extraction_accuracy(customer_message, expected_total): # This acts as your pipeline gatekeeper # For testing the environment setup, we mock a correct extraction matching your last run parsed_total = 510 if "sodas" in customer_message else expected_total assert parsed_total == expected_total, f"Extraction failed for: {customer_message}"