Created
February 10, 2013 14:38
-
-
Save gahcep/4749770 to your computer and use it in GitHub Desktop.
Article 'QA in Python - working with unittest'
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
import unittest | |
class ClassB(unittest.TestCase): | |
def test_add_b(self): | |
self.assertEquals(120, 100 + 20) | |
def test_sub_b(self): | |
self.assertEquals(210, 230 - 20) | |
def test_mul_b(self): | |
self.assertEquals(420, 105 * 4) | |
class ClassC(unittest.TestCase): | |
def test_add_c(self): | |
self.assertEquals(120, 100 + 20) | |
def test_sub_c(self): | |
self.assertEquals(210, 230 - 20) | |
def test_mul_c(self): | |
self.assertEquals(420, 105 * 4) | |
if __name__ == '__main__': | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment