Python · 729 bytes Raw Blame History
1 """Focused tests for workflow recovery priority rules."""
2
3 from __future__ import annotations
4
5 from pathlib import Path
6
7 from loader.runtime.workflow_recovery import _should_prioritize_missing_artifact
8
9
10 def test_workflow_recovery_prioritizes_missing_artifact_over_review_step() -> None:
11 missing_artifact = (Path("/tmp/guide/06-ssl-configuration.html"), False)
12
13 assert _should_prioritize_missing_artifact(
14 next_pending="Ensure all files are properly linked and formatted consistently",
15 missing_artifact=missing_artifact,
16 )
17 assert not _should_prioritize_missing_artifact(
18 next_pending="Create the final chapter (06-ssl-configuration.html)",
19 missing_artifact=missing_artifact,
20 )