Add pricing module, tests and Jenkinsfile for CI (#11)
Scrap-Web/pipeline/pr-main This commit looks good
Scrap-Web/pipeline/pr-main This commit looks good
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
"""Pricing helper for the Scrap-Web CI pipeline (SSW 590, Jenkins assignment)."""
|
||||
|
||||
|
||||
def total_price(unit_price, quantity):
|
||||
"""Return the total price for `quantity` items at `unit_price` each."""
|
||||
if quantity < 1:
|
||||
raise ValueError("Quantity must be positive")
|
||||
return unit_price * quantity
|
||||
Reference in New Issue
Block a user