本文整理匯總了Python中radical.entk.Pipeline._increment_stage方法的典型用法代碼示例。如果您正苦於以下問題:Python Pipeline._increment_stage方法的具體用法?Python Pipeline._increment_stage怎麽用?Python Pipeline._increment_stage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類radical.entk.Pipeline
的用法示例。
在下文中一共展示了Pipeline._increment_stage方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_pipeline_decrement_stage
# 需要導入模塊: from radical.entk import Pipeline [as 別名]
# 或者: from radical.entk.Pipeline import _increment_stage [as 別名]
def test_pipeline_decrement_stage():
p = Pipeline()
s1 = Stage()
t = Task()
t.executable = ['/bin/date']
s1.tasks = t
s2 = Stage()
t = Task()
t.executable = ['/bin/date']
s2.tasks = t
p.add_stages([s1, s2])
p._increment_stage()
p._increment_stage()
assert p._stage_count == 2
assert p._cur_stage == 2
assert p._completed_flag.is_set() == True
p._decrement_stage()
assert p._stage_count == 2
assert p._cur_stage == 1
assert p._completed_flag.is_set() == False
p._decrement_stage()
assert p._stage_count == 2
assert p._cur_stage == 0
assert p._completed_flag.is_set() == False