unit_tmpl.py 635 B

1234567891011121314151617181920212223242526
  1. __author__ = 'You'
  2. # unit test files should be named test_<your name here>.py
  3. # this ensures they will automatically be included in the
  4. # ./skulpt.py test or ./skulpt.py dist testing procedures
  5. #
  6. import unittest
  7. class SimpleMath(unittest.TestCase):
  8. def setUp(self):
  9. # run prior to each test
  10. pass
  11. def tearDown(self):
  12. # run after each test
  13. pass
  14. def testOne(self):
  15. # tests must follow the naming convention of starting with test
  16. x = 2 + 2
  17. self.assertEqual(x, 4)
  18. self.assertEqual(type(x), int)
  19. if __name__ == '__main__':
  20. unittest.main()