All pastes #525572 Raw Edit

Stuff

public text v1 · immutable
#525572 ·published 2007-05-31 12:37 UTC
rendered paste body
# testArchetype.py

import unittest

class MyTest( unittest.TestCase ):
    def setUp( self ): 	
 	self.x = 4  
 
    def testSomething( self ):
	x = 2 + 2
	self.assertTrue( self.x==4 )
 
    def testSomethingelse( self ):
	x = 2 + 3
	self.assertTrue( x==5 )

MyTestSuite = unittest.makeSuite( MyTest )

if __name__ == '__main__':
    unittest.TextTestRunner( verbosity=2 ).run( MyTestSuite )

#########
#testAll.py

import unittest
from testArchetype import MyTestSuite 			
# from testArchetype2 import MyTestSuite2  etc... 

alltests = unittest.TestSuite( MyTestSuite ) 			 
unittest.TextTestRunner( verbosity=2 ).run( alltests )