本文整理匯總了Python中hqc_meas.tasks.api.RootTask.children_task方法的典型用法代碼示例。如果您正苦於以下問題:Python RootTask.children_task方法的具體用法?Python RootTask.children_task怎麽用?Python RootTask.children_task使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類hqc_meas.tasks.api.RootTask
的用法示例。
在下文中一共展示了RootTask.children_task方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_build_from_config1
# 需要導入模塊: from hqc_meas.tasks.api import RootTask [as 別名]
# 或者: from hqc_meas.tasks.api.RootTask import children_task [as 別名]
def test_build_from_config1(self):
# Test building a interfaceable task from a config.
aux = RootTask()
aux.children_task = [IMixin()]
bis = RootTask.build_from_config(aux.task_preferences,
{'tasks': {'IMixin': IMixin,
'RootTask': RootTask}})
assert_equal(type(bis.children_task[0]).__name__, 'IMixin')
示例2: test_child_deletion_handling1
# 需要導入模塊: from hqc_meas.tasks.api import RootTask [as 別名]
# 或者: from hqc_meas.tasks.api.RootTask import children_task [as 別名]
def test_child_deletion_handling1():
# Test that adding a task to the root task is correctly handled.
root = RootTask()
task1 = ComplexTask(task_name='task1',
task_database_entries={'val1': 2.0})
root.children_task.append(task1)
root.children_task = []
示例3: test_collect_dependencies
# 需要導入模塊: from hqc_meas.tasks.api import RootTask [as 別名]
# 或者: from hqc_meas.tasks.api.RootTask import children_task [as 別名]
def test_collect_dependencies(self):
# Test collecting build dependencies.
self.workbench.register(TaskManagerManifest())
from hqc_meas.tasks.api import RootTask, ComplexTask
from hqc_meas.tasks.tasks_util.log_task import LogTask
aux = [LogTask(task_name="r")]
root = RootTask(task_name="root")
root.children_task = [ComplexTask(task_name="complex", children_task=aux), LogTask(task_name="t")]
core = self.workbench.get_plugin(u"enaml.workbench.core")
com = u"hqc_meas.dependencies.collect_dependencies"
res, build, run = core.invoke_command(com, {"obj": root}, core)
assert_true(res)
assert_in("tasks", build)
assert_equal(sorted(["LogTask", "ComplexTask"]), sorted(build["tasks"].keys()))
assert_not_in("interfaces", build)
assert_false(run)