diff --git a/api/calculator/test_calculator.py b/api/calculator/test_calculator.py index 69fa778f1..4c0e68150 100644 --- a/api/calculator/test_calculator.py +++ b/api/calculator/test_calculator.py @@ -27,4 +27,7 @@ def test_divide(): assert Calculator.divide(1, 2) == 0.5 assert Calculator.divide(1.0, 2.0) == 0.5 assert Calculator.divide(0, 2.0) == 0 - assert Calculator.divide(-4, 2.0) == -2.0 \ No newline at end of file + assert Calculator.divide(-4, 2.0) == -2.0 + +def test_divide_by_0(): + assert Calculator.divide(2.0, 0) == 'Cannot divide by 0' \ No newline at end of file