Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(37)  |  Call(30)  |  Derive(0)  |  Import(7)
The main class of ActionTree. It represents an action to be started after all its dependencies
are finished.

src/a/c/ActionTree-0.4.0/ActionTree/tests/Preview.py   ActionTree(Download)
import unittest
 
from ActionTree import Action
 
 
class Preview(unittest.TestCase):
    def testGetDependenciesAndLabelsAreNotOnlyEqualButSame(self):
        bLabel = ("b",)
        a = Action(lambda: 0, "a")
        b = Action(lambda: 0, bLabel)
    def testSimplePreview(self):
        a = Action(lambda: 0, "a")
        self.assertEqual(a.getPreview(), ["a"])
 
    def testTypedLabel(self):
        a = Action(lambda: 0, ("a", "curious", "label", 42))

src/a/c/ActionTree-0.4.0/ActionTree/tests/DependencyCycle.py   ActionTree(Download)
import unittest
 
from ActionTree import Action
 
 
class DependencyCycle(unittest.TestCase):
    def testSelfDependency(self):
        a = Action(lambda: 0, "a")
    def testShortCycle(self):
        a = Action(lambda: 0, "a")
        b = Action(lambda: 0, "b")
        a.addDependency(b)
        with self.assertRaises(Exception) as cm:
            b.addDependency(a)
        self.assertEqual(cm.exception.args[0], "Dependency cycle")
 
    def testLongCycle(self):
        a = Action(lambda: 0, "a")

src/a/c/ActionTree-0.4.0/ActionTree/tests/Timing.py   ActionTree(Download)
import MockMockMock
 
from ActionTree import Action, CompoundException
 
 
        self.time = self.mocks.create("time")
 
        self.a = Action(self.m.object, "timed")
        self.oldTime = Action._time
        Action._time = self.time.object

src/a/c/ActionTree-0.4.0/ActionTree/tests/MultipleExecutions.py   ActionTree(Download)
import MockMockMock
 
from ActionTree import Action, CompoundException
 
 
    def __createMockedAction(self, name):
        mock = self.mocks.create(name + "Mock")
        action = Action(mock.object, name)
        return action, mock
 

src/a/c/ActionTree-0.4.0/ActionTree/tests/ExceptionsHandling.py   ActionTree(Download)
import MockMockMock
 
from ActionTree import Action, CompoundException
 
 
    def __createMockedAction(self, name):
        mock = self.mocks.create(name + "Mock")
        action = Action(mock.object, name)
        return action, mock
 

src/a/c/ActionTree-0.4.0/ActionTree/tests/Execution.py   ActionTree(Download)
import MockMockMock
 
from ActionTree import Action
 
 
    def __createMockedAction(self, name):
        mock = self.mocks.create(name + "Mock")
        action = Action(mock.object, name)
        return action, mock
 

src/a/c/ActionTree-0.4.0/ActionTree/tests/MultiThreadedExecution.py   ActionTree(Download)
import MockMockMock
 
from ActionTree import Action
 
 
    def __createMockedAction(self, name):
        mock = self.mocks.create(name + "Mock")
        action = Action(ExecuteMock(mock.object), name)
        return action, mock