diff --git a/tests/test_math_utils.py b/tests/test_math_utils.py new file mode 100644 index 0000000..885391e --- /dev/null +++ b/tests/test_math_utils.py @@ -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() \ No newline at end of file