Example #1
0
 def setUp( self ):
     TestCase.setUp( self )
     self.a1 = self.m.createMock( "self.a1", Action )
     self.a2 = self.m.createMock( "self.a2", Action )
     self.a3 = self.m.createMock( "self.a3", Action )
     self.a3.addPredecessor( self.a2 )
     self.a3.addPredecessor( self.a1 )
     self.a2.addPredecessor( self.a1 )
Example #2
0
 def setUp( self ):
     TestCase.setUp( self )
     self.atomicArtifact1 = self.m.createMock( "self.atomicArtifact1", AtomicArtifact, "AtomicArtifact1", [ os.path.join( "tmp1", "file1" ) ], [], [], [], False )
     AtomicArtifact._AtomicArtifact__fileIsMissing = self.m.createMock( "AtomicArtifact._AtomicArtifact__fileIsMissing" )
     self.atomicArtifact2 = self.m.createMock( "self.atomicArtifact2", AtomicArtifact, "AtomicArtifact2", [ os.path.join( "tmp2", "file2" ) ], [], [], [], False )
     AtomicArtifact._AtomicArtifact__fileIsMissing = self.m.createMock( "AtomicArtifact._AtomicArtifact__fileIsMissing" )
     self.artifact = self.m.createMock( "self.artifact", CompoundArtifact, "CompoundArtifact", [ self.atomicArtifact1, self.atomicArtifact2 ], False )
     self.fileProductionAction1 = self.m.createMock( "self.fileProductionAction1", Action )
     self.fileProductionAction2 = self.m.createMock( "self.fileProductionAction2", Action )
Example #3
0
 def setUp( self ):
     TestCase.setUp( self )
     self.a11 = self.m.createMock( "self.a11", Action )
     self.a12 = self.m.createMock( "self.a12", Action )
     self.a13 = self.m.createMock( "self.a13", Action )
     self.a2 = self.m.createMock( "self.a2", Action )
     self.a2.addPredecessor( self.a11 )
     self.a2.addPredecessor( self.a12 )
     self.a2.addPredecessor( self.a13 )
Example #4
0
 def setUp( self ):
     TestCase.setUp( self )
     self.a1 = self.m.createMock( "self.a1", Action )
     self.a2 = self.m.createMock( "self.a2", Action )
     self.a3 = self.m.createMock( "self.a3", Action )
     self.a4 = self.m.createMock( "self.a4", Action )
     self.b1 = self.m.createMock( "self.b1", Action )
     self.b2 = self.m.createMock( "self.b2", Action )
     self.b3 = self.m.createMock( "self.b3", Action )
     self.b4 = self.m.createMock( "self.b4", Action )
Example #5
0
 def setUp( self ):
     TestCase.setUp( self )
     self.mgr = self.m.createMock( "self.mgr" )
     self.a11 = ActionForMultiThreadTesting( self.mgr, ( 1 + random.random() ) / 10 )
     self.a12 = ActionForMultiThreadTesting( self.mgr, ( 1 + random.random() ) / 10 )
     self.a13 = ActionForMultiThreadTesting( self.mgr, ( 1 + random.random() ) / 10 )
     self.a14 = ActionForMultiThreadTesting( self.mgr, ( 1 + random.random() ) / 10 )
     self.a15 = ActionForMultiThreadTesting( self.mgr, ( 1 + random.random() ) / 10 )
     self.a2 = ActionForMultiThreadTesting( self.mgr, .1 )
     self.a2.addPredecessor( self.a11 )
     self.a2.addPredecessor( self.a12 )
     self.a2.addPredecessor( self.a13 )
     self.a2.addPredecessor( self.a14 )
     self.a2.addPredecessor( self.a15 )
Example #6
0
 def setUp( self ):
     TestCase.setUp( self )
     self.strongDependency = self.m.createMock( "self.strongDependency", Artifact, "Dependency", False )
     self.orderOnlyDependency = self.m.createMock( "self.orderOnlyDependency", Artifact, "Order only dependency", False )
     self.automaticDependency = self.m.createMock( "self.automaticDependency", Artifact, "Automatic dependency", False )
     self.artifact = self.m.createMock( "self.artifact", AtomicArtifact, "AtomicArtifact", [ os.path.join( "tmp1", "file1" ) ], [ self.strongDependency ], [ self.orderOnlyDependency ], [ self.automaticDependency ], False )
     AtomicArtifact._AtomicArtifact__fileIsMissing = self.m.createMock( "AtomicArtifact._AtomicArtifact__fileIsMissing" )
     self.productionAction = self.m.createMock( "self.productionAction", Action )
     self.strongDependencyProductionAction = self.m.createMock( "self.strongDependencyProductionAction", Action )
     self.orderOnlyDependencyProductionAction = self.m.createMock( "self.orderOnlyDependencyProductionAction", Action )
     self.automaticDependencyProductionAction = self.m.createMock( "self.automaticDependencyProductionAction", Action )
     self.strongDependency.getNewestFile = self.m.createMock( "self.strongDependency.getNewestFile" )
     self.orderOnlyDependency.getNewestFile = self.m.createMock( "self.orderOnlyDependency.getNewestFile" )
     self.automaticDependency.getNewestFile = self.m.createMock( "self.automaticDependency.getNewestFile" )
     self.artifact.getOldestFile = self.m.createMock( "self.artifact.getOldestFile" )
Example #7
0
 def setUp( self ):
     TestCase.setUp( self )
     self.a = self.m.createMock( "self.a" )
     self.b = self.m.createMock( "self.b" )
     self.c = self.m.createMock( "self.c" )
Example #8
0
 def setUp( self ):
     TestCase.setUp( self )
     self.artifact = self.m.createMock( "self.artifact", AtomicArtifact, "TestArtefact", [ os.path.join( "tmp1", "file1" ), os.path.join( "tmp2", "file2" ) ], [], [], [], False )
     AtomicArtifact._AtomicArtifact__fileIsMissing = self.m.createMock( "AtomicArtifact._AtomicArtifact__fileIsMissing" )
     self.productionAction = self.m.createMock( "self.productionAction", Action )
Example #9
0
 def setUp( self ):
     TestCase.setUp( self )
     self.a1 = self.m.createMock( "self.a1", Action )
     self.a2 = self.m.createMock( "self.a2", Action )
     self.a3 = self.m.createMock( "self.a3", Action )
Example #10
0
 def setUp( self ):
     TestCase.setUp( self )
     self.a = self.m.createMock( "self.a", Action )
     self.__oldTime = time.time