Posted By

manatlan on 10/21/09


Tagged

python tech unittests


Versions (?)

Python unittests : turning old tests in unittest cases


 / Published in: Python
 

  1. import unittest
  2.  
  3. @unittest.FunctionTestCase
  4. def old_tests():
  5. assert 1==1
  6.  
  7. if __name__ == "__main__":
  8. suite = unittest.TestSuite()
  9. suite.addTest( old_tests )
  10.  
  11. unittest.TextTestRunner().run( suite )

Report this snippet  

You need to login to post a comment.