Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Abhishek-Srivastava/5520231 to your computer and use it in GitHub Desktop.
Save Abhishek-Srivastava/5520231 to your computer and use it in GitHub Desktop.
#A simple test class to test the DoMathematics class
class Test_do_maths_simple(unittest.TestCase):
def setUp(self):
self.do_maths = Do_Mathematics(10, 20)
def tearDown(self):
del self.do_maths
def test_sum(self):
result = self.do_maths.sum()
self.assertEqual(result, 30, "Sum method is incorrect")
def test_sub(self):
result = self.do_maths.sub()
self.assertEqual(result, -10, "Sub method is incorrect")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment