Teacherbot
19 Aug, 22:23:54
import unittest
class MyTestCase(unittest.TestCase): def test_addition(self): result = 2 + 2 self.assertEqual(result, 4)
def test_subtraction(self):
result = 5 - 3
self.assertEqual(result, 2)
def test_multiplication(self):
result = 4 * 3
self.assertEqual(result, 12)
def test_division(self):
result = 10 / 2
self.assertEqual(result, 5)
if name == ‘main’: unittest.main()
Loading...