mirror of
https://github.com/langgenius/dify.git
synced 2026-11-29 16:18:01 +08:00
Co-authored-by: Stephen Zhou <hi@hyoban.cc> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Jyong <jyong@dify.ai>
20 lines
565 B
Python
20 lines
565 B
Python
from models.evaluation import EvaluationRun, EvaluationTargetType
|
|
|
|
|
|
def test_evaluation_run_progress_uses_persisted_phase_progress() -> None:
|
|
run = EvaluationRun(
|
|
tenant_id="tenant-1",
|
|
target_type=EvaluationTargetType.APPS,
|
|
target_id="app-1",
|
|
target_workflow_version_id="workflow-1",
|
|
evaluation_config_id="config-1",
|
|
config_snapshot="{}",
|
|
total_items=10,
|
|
completed_items=0,
|
|
failed_items=0,
|
|
progress_rate=0.45,
|
|
created_by="account-1",
|
|
)
|
|
|
|
assert run.progress == 0.45
|