def test_returns_total_price_when_both_a_and_b_discounts_apply(): assert checkout('AAABB') == 175
def test_returns_total_price_with_multiple_b_discounts(items_total): items, total = items_total assert checkout(items) == total
def test_empty_basket_returns_0(): assert checkout('') == 0
def test_returns_total_price_with_one_a_discount(items_total): items, total = items_total assert checkout(items) == total
def test_multiple_items_returns_total_price(items_total): items, total = items_total assert checkout(items) == total
def test_single_item_returns_price(item_price): item, price = item_price assert checkout(item) == price