def setUp(self): reg = registry_tests.small_testing_registry() scheme = Scheme() zero = scheme.new_node(reg.widget("zero")) one = scheme.new_node(reg.widget("one")) add = scheme.new_node(reg.widget("add")) scheme.new_link(zero, "value", add, "left") scheme.new_link(one, "value", add, "right") self.scheme = scheme
def test_set_model(self): workflow = self.scheme wm = TestingWidgetManager() wm.set_workflow(workflow) wm.set_workflow(workflow) wm.set_creation_policy(WidgetManager.Immediate) wm.set_workflow(Scheme())
def __init__(self, parent=None, title=None, description=None): Scheme.__init__(self, parent, title, description) self.signal_manager = WidgetsSignalManager(self) self.widget_manager = WidgetManager() self.widget_manager.set_scheme(self)
def workflow_constructor(self, *args, **kwargs): return Scheme(*args, **kwargs)