Created
May 5, 2013 09:09
-
-
Save Abhishek-Srivastava/5520231 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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