work in progress: working on nodes lifecycle.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
from bonobo import Graph
|
||||
from bonobo.constants import EMPTY, BEGIN, END
|
||||
from bonobo.execution.contexts import GraphExecutionContext
|
||||
|
||||
|
||||
@ -49,9 +50,8 @@ def test_lifecycle_of_graph_with_recoverable_error():
|
||||
def test_lifecycle_of_graph_with_unrecoverable_error():
|
||||
graph = Graph([1, 2, 3], raise_an_unrecoverrable_error, print)
|
||||
with GraphExecutionContext(graph) as context:
|
||||
assert context.started
|
||||
assert context.alive
|
||||
assert not context.stopped
|
||||
assert context.started and context.alive and not context.stopped
|
||||
context.write(BEGIN, EMPTY, END)
|
||||
context.loop()
|
||||
assert context.started
|
||||
assert not context.alive
|
||||
|
||||
Reference in New Issue
Block a user