From 032a0dba478655b898c4456086f31084a1741f4f Mon Sep 17 00:00:00 2001 From: waterShangShu <462285866@qq.com> Date: Tue, 24 Mar 2026 10:46:04 +0800 Subject: [PATCH] add zero test --- api/calculator/test_calculator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/calculator/test_calculator.py b/api/calculator/test_calculator.py index ad1a589..225c700 100644 --- a/api/calculator/test_calculator.py +++ b/api/calculator/test_calculator.py @@ -28,4 +28,6 @@ def test_divide(): 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 + +def test_divide_by_zero(): + assert Calculator.divide(1, 0) == "Cannot divide by 0" \ No newline at end of file