generated from coulomb/repo-seed
Complete workplan state model cleanup
This commit is contained in:
@@ -12,7 +12,7 @@ def test_all_assertions_satisfied_reports_reachable_workstations():
|
||||
workstations=[
|
||||
WorkstationDef(name="active"),
|
||||
WorkstationDef(
|
||||
name="completed",
|
||||
name="finished",
|
||||
entry_assertions=[
|
||||
AssertionDef(
|
||||
id="tasks.all_done",
|
||||
@@ -31,7 +31,7 @@ def test_all_assertions_satisfied_reports_reachable_workstations():
|
||||
)
|
||||
|
||||
assert result.exit_blocked is False
|
||||
assert result.reachable == ["active", "completed"]
|
||||
assert result.reachable == ["active", "finished"]
|
||||
assert result.unreachable == []
|
||||
|
||||
|
||||
@@ -135,18 +135,18 @@ def test_yaml_flow_definitions_load_and_evaluate_representative_entities():
|
||||
workstream_result = FlowEngine(
|
||||
custom_ops={
|
||||
"dependencies.any_incomplete": lambda assertion, obj, values: any(
|
||||
value != assertion.value for value in values
|
||||
value not in assertion.value for value in values
|
||||
)
|
||||
}
|
||||
).evaluate(
|
||||
{
|
||||
"status": "active",
|
||||
"tasks": [{"status": "done"}],
|
||||
"dependencies": [{"workstation": "completed"}],
|
||||
"dependencies": [{"workstation": "finished"}],
|
||||
},
|
||||
flows["workstream"],
|
||||
)
|
||||
assert "completed" in workstream_result.reachable
|
||||
assert "finished" in workstream_result.reachable
|
||||
assert "blocked" in [item.workstation for item in workstream_result.unreachable]
|
||||
|
||||
task_result = FlowEngine().evaluate(
|
||||
|
||||
Reference in New Issue
Block a user