Package qm :: Package test :: Module resource_adapter
[hide private]
[frames] | no frames]

Source Code for Module qm.test.resource_adapter

 1  ######################################################################## 
 2  # 
 3  # File:   resource_adapter.py 
 4  # Author: Mark Mitchell 
 5  # Date:   2005-09-02 
 6  # 
 7  # Contents: 
 8  #   QMTest ResourceAdapter class. 
 9  # 
10  # Copyright (c) 2005 by CodeSourcery, LLC.  All rights reserved.  
11  # 
12  # For license terms see the file COPYING. 
13  # 
14  ######################################################################## 
15   
16  ######################################################################## 
17  # Imports 
18  ######################################################################## 
19   
20  from qm.test.resource import Resource 
21   
22  ######################################################################## 
23  # Classes 
24  ######################################################################## 
25   
26 -class ResourceAdapter(Resource):
27 """A 'ResourceAdapter' converts test classes to resource classes. 28 29 If 'C' is a test class, then a class derived from 30 'ResourceAdapter' and 'C' (in that order!) will be a resource 31 class. The resource class 'Setup' method is equivalent to the 32 'Test' class 'Run' method. The 'CleanUp' action is empty.""" 33
34 - def SetUp(self, context, result):
35 36 # To set up the resource, just run the underlying test class. 37 self.Run(context, result)
38