Design Architecture for Utility Functions (iss-1ac610bafd4c)
Some checks are pending
ci / test (push) Waiting to run

This commit is contained in:
forge-bot 2026-07-09 01:02:16 +00:00
parent 4c157b9c4e
commit 37136d73d3

22
tests/test_math_utils.py Normal file
View file

@ -0,0 +1,22 @@
import unittest
from utils.math_utils import add, subtract, multiply, divide
class TestMathUtils(unittest.TestCase):
def test_add(self):
self.assertEqual(add(1, 2), 3)
def test_subtract(self):
self.assertEqual(subtract(5, 3), 2)
def test_multiply(self):
self.assertEqual(multiply(3, 4), 12)
def test_divide(self):
self.assertEqual(divide(10, 2), 5)
with self.assertRaises(ValueError):
divide(10, 0)
if __name__ == '__main__':
unittest.main()