pyunit框架
'''
Created on Aug 10, 2011
@author: wensi
'''
import unittest
class TestClass1(unittest.TestCase):
def testCase1(self):
self.assertEquals(7/2,3)
def testCase2(self):
self.assertEquals("".join(['a','b',' c']),"abc")
def testCase3(self):
pass
class TestClass2(unittest.TestCase):
def testCase(self):
self.assertRaises(ZeroDivisionError,lambda x: 3/x,0)
if __name__ == "__main__":
#import sys;sys.argv = ['', 'Test.testName']
unittest.main()