A Simple Test Using the unittest Framework : Unit test : Buildin Module PYTHON TUTORIALS


PYTHON TUTORIALS » Buildin Module » Unit test »

 

A Simple Test Using the unittest Framework


import unittest, my_math

class ProductTestCase(unittest.TestCase):
   def testIntegers(self):
       self.failUnless(== 2'Integer multiplication failed')

   def testFloats(self):
       self.failUnless(1.1 == 2.2'Float multiplication failed')

unittest.main()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Buildin Module
» Unit test