feat: testing tutorial

This commit is contained in:
Sandro Zimmermann 2026-03-26 11:19:06 +01:00
parent 51964de52c
commit 17297aaf7d
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,2 @@
def discount_price(price: float, percent: float) -> float:
return price - price * percent / 100

View File

@ -0,0 +1,6 @@
from src.tutorial.testing.shop.pricing import discount_price
def test_discount_price_reduces_price():
result = discount_price(100.0, 20.0)
assert result == 80