本文整理汇总了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)