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

Source Code for Module qm.test.classes.serial_target

 1  ######################################################################## 
 2  # 
 3  # File:   serial_target.py 
 4  # Author: Mark Mitchell 
 5  # Date:   12/19/2001 
 6  # 
 7  # Contents: 
 8  #   SerialTarget 
 9  # 
10  # Copyright (c) 2001, 2002, 2003 by CodeSourcery, LLC.  All rights reserved.  
11  # 
12  ######################################################################## 
13   
14  ######################################################################## 
15  # Imports 
16  ######################################################################## 
17   
18  from   qm.test.target import Target 
19  from   qm.temporary_directory import TemporaryDirectory 
20   
21  ######################################################################## 
22  # Classes 
23  ######################################################################## 
24   
25 -class SerialTarget(Target):
26 """A target that runs tests in serial on the local machine.""" 27
28 - def __init__(self, database, properties):
29 30 super(SerialTarget, self).__init__(database, properties) 31 self.__temporary_directory = TemporaryDirectory()
32 33
34 - def IsIdle(self):
35 """Return true if the target is idle. 36 37 returns -- True if the target is idle. If the target is idle, 38 additional tasks may be assigned to it.""" 39 40 # The target is always idle when this method is called since 41 # whenever it asked to perform a task it blocks the caller. 42 return 1
43 44
45 - def _GetTemporaryDirectory(self):
46 47 return self.__temporary_directory.GetPath()
48