============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-8.3.2, pluggy-1.5.0
rootdir: /home/dev/orders
configfile: pyproject.toml
plugins: anyio-4.4.0, cov-5.0.0
collected 214 items

tests/test_cart.py ....................................... [ 18%]
tests/test_catalog.py ................................. [ 33%]
tests/test_checkout.py .........F.......... [ 43%]
tests/test_invoice.py ........................... [ 55%]
tests/test_payment.py .............................. [ 69%]
tests/test_pricing.py ....................... [ 80%]
tests/test_shipping.py ................ [ 87%]
tests/test_user.py ............................ [100%]

=================================== FAILURES ===================================
____________________ test_discount_never_exceeds_total _____________________

    def test_discount_never_exceeds_total():
        cart = Cart(items=[Item("kettle", 2400)])
        cart.apply(Coupon("WELCOME", percent=120))
>       assert cart.total() >= 0
E       assert -480 >= 0
E        +  where -480 = <Cart items=1 subtotal=2400>.total()

tests/test_checkout.py:88: AssertionError
=========================== short test summary info ============================
FAILED tests/test_checkout.py::test_discount_never_exceeds_total - assert -480 >= 0
======================= 1 failed, 213 passed in 4.21s ========================
