diff --git a/src/math_operations.py b/src/math_operations.py index ae02251..084d51c 100644 --- a/src/math_operations.py +++ b/src/math_operations.py @@ -2,4 +2,7 @@ def add(a,b): return a+b def sub(a,b): - return a-b \ No newline at end of file + return a-b + +def mul(a, b): + return a * b \ No newline at end of file diff --git a/tests/test_operation.py b/tests/test_operation.py index 07e3ec7..9e66d9c 100644 --- a/tests/test_operation.py +++ b/tests/test_operation.py @@ -1,4 +1,4 @@ -from src.math_operations import add,sub +from src.math_operations import add,sub,mul def test_add(): assert add(2,3)==5 @@ -8,4 +8,10 @@ def test_sub(): assert sub(5,3)==2 assert sub(4,3)==1 assert sub(3,3)==0 - assert sub(2,3)==-1 \ No newline at end of file + assert sub(2,3)==-1 + +def test_mul(): + assert mul(1, 0) == 0 + assert mul(0, 1) == 0 + assert mul(1, 1) == 1 + assert mul(100, 100) == 10000 \ No newline at end of file