Files
cleveractors-core/features/steps/progress_coverage_steps.py
CoreRasurae 3fc0a3fa57
CI / lint (pull_request) Successful in 35s
CI / quality (pull_request) Successful in 44s
CI / typecheck (pull_request) Successful in 47s
CI / security (pull_request) Successful in 56s
CI / unit_tests (pull_request) Successful in 3m33s
CI / integration_tests (pull_request) Successful in 56s
CI / build (pull_request) Successful in 34s
CI / coverage (pull_request) Successful in 3m34s
CI / status-check (pull_request) Successful in 3s
CI / quality (push) Successful in 49s
CI / lint (push) Successful in 51s
CI / typecheck (push) Successful in 52s
CI / build (push) Successful in 41s
CI / security (push) Successful in 58s
CI / integration_tests (push) Successful in 1m0s
CI / unit_tests (push) Successful in 3m37s
CI / coverage (push) Successful in 3m34s
CI / status-check (push) Successful in 5s
test(coverage): add BDD unit tests to close coverage gap toward 97%
Add comprehensive BDD Behave unit tests across six modules to improve
line coverage. New feature files and step definitions for:

- validation/_actor: graph/llm/tool/multi_actor config validation
- runtime_tokens: token estimation with tiktoken and fallback heuristics
- dynamic_router: ContentBasedCondition, RouterNode, graph extension
- runtime: v2 route format, config blocks, conversation history, multi-actor
- progress: ProgressBarManager remaining count resolution
- route: MESSAGE_ROUTER rules to metadata in to_graph_config

Also fix credential executor and graph cleanup step mocks to return
proper tuple values matching updated runtime signatures.

Refs: #39
2026-06-09 16:06:32 +01:00

39 lines
1013 B
Python

"""Step definitions for ProgressBarManager coverage tests."""
from __future__ import annotations
from behave import given, then, when
from behave.runner import Context
from cleveractors.core.progress import ProgressBarManager
@given("the progress test context is initialized (prg)")
def step_prg_init(context: Context) -> None:
context.prg_result = None
@given("the progress manager update is called with total 10 and remaining 8 (prg)")
def step_prg_update(context: Context) -> None:
ProgressBarManager.update(
stage="writing",
total=10,
remaining=8,
current=2,
)
@when("the progress snapshot is retrieved (prg)")
def step_prg_snapshot(context: Context) -> None:
context.prg_result = ProgressBarManager.update(
stage="writing",
total=10,
remaining=8,
current=3,
)
@then("the snapshot should have total 10 and remaining 8 (prg)")
def step_prg_check(context: Context) -> None:
assert context.prg_result is not None