Skip to content

Instantly share code, notes, and snippets.

@gahcep
Created February 10, 2013 14:38
Show Gist options
  • Save gahcep/4749768 to your computer and use it in GitHub Desktop.
Save gahcep/4749768 to your computer and use it in GitHub Desktop.
Article 'QA in Python - working with unittest'
import unittest
class ClassA(unittest.TestCase):
def test_add_a(self):
self.assertEquals(120, 100 + 20)
def test_sub_a(self):
self.assertEquals(210, 230 - 20)
def test_mul_a(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