def testVetoBadNameCreation(self): ThresholdingWorker(self.composite) ThresholdingWorker(self.composite) ThresholdingWorker(self.composite) ThresholdingWorker(self.composite) ThresholdingWorker(self.composite) ThresholdingWorker(self.composite)
class CompositeWorkerParamNameChangeTest(unittest.TestCase): def setUp(self): self.composite = CompositeWorker() self.worker1 = ThresholdingWorker(self.composite) self.worker1.getParam('name').value = 'worker1' self.worker2 = ThresholdingWorker(self.composite) self.worker2.getParam('name').value = 'worker2' def testVetoBadNameChange(self): def setNameParam(): self.worker1.getParam('name').value = 'worker2' self.assertRaises(Param.VetoParamChange, setNameParam) def testVetoGoodNameChange(self): self.worker1.getParam('name').value = 'worker1_neu' def testVetoBadNameCreation(self): ThresholdingWorker(self.composite) ThresholdingWorker(self.composite) ThresholdingWorker(self.composite) ThresholdingWorker(self.composite) ThresholdingWorker(self.composite) ThresholdingWorker(self.composite)
def setUp(self): self.composite = CompositeWorker() self.worker1 = ThresholdingWorker(self.composite) self.worker1.getParam('name').value = 'worker1' self.worker2 = ThresholdingWorker(self.composite) self.worker2.getParam('name').value = 'worker2'