Skip to content

Commit 8eb3191

Browse files
committed
add test script
1 parent 1f258ff commit 8eb3191

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# test_arithmetic.py
2+
3+
import arithmetic
4+
import unittest
5+
6+
class TestArithmetic(unittest.TestCase):
7+
8+
def test_addition(self):
9+
self.assertEqual(arithmetic.add(1, 2), 3)
10+
11+
def test_subtraction(self):
12+
self.assertEqual(arithmetic.subtract(2, 1), 1)
13+
14+
def test_multiplication(self):
15+
self.assertEqual(arithmetic.multiply(5, 5), 25)
16+
17+
def test_division(self):
18+
self.assertEqual(arithmetic.divide(8, 2), 4)
19+
20+
21+
if __name__ == '__main__':
22+
unittest.main()

0 commit comments

Comments
 (0)