Add tests and code for divide function
This commit is contained in:
1 parent
4ba1e2cb90
commit
6aa5a2b6b3
2 files changed
+7
No files matched your search
@@ -13,3 +13,7 @@ def subtract(first_term, second_term):
|
|||||||
|
|
||||||
def multiply(first_term, second_term):
|
def multiply(first_term, second_term):
|
||||||
return first_term * second_term
|
return first_term * second_term
|
||||||
|
|
||||||
|
|
||||||
|
def divide(first_term, second_term):
|
||||||
|
return first_term / second_term
|
||||||
@@ -15,3 +15,6 @@ class TestCalculator:
|
|||||||
|
|
||||||
def test_multiplication(self):
|
def test_multiplication(self):
|
||||||
assert 100 == calculator.multiply(10, 10)
|
assert 100 == calculator.multiply(10, 10)
|
||||||
|
|
||||||
|
def test_divide(self):
|
||||||
|
assert 20 == calculator.divide(100, 5)
|
||||||
Reference in new issue
Block a user