fix: make build-profile output message neutral

This commit is contained in:
Antoine 2026-05-28 18:32:42 +02:00
parent d27c58014d
commit 8d232060a0
2 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ def build_profile(
save_candidate_profile_yaml(out, candidate_profile)
typer.echo(f"candidate-profile.yaml written to {out}")
typer.echo(f"candidate profile written to {out}")
warning_count = len(candidate_profile.warnings)
if warning_count:
typer.echo(f"Warnings included: {warning_count}")

View File

@ -76,7 +76,7 @@ def test_build_profile_writes_yaml_from_cv_and_profile(tmp_path) -> None:
)
assert result.returncode == 0
assert f"candidate-profile.yaml written to {out}" in result.stdout
assert f"candidate profile written to {out}" in result.stdout
assert "Warnings included: 1" in result.stdout
payload = load_yaml(out)
@ -85,7 +85,7 @@ def test_build_profile_writes_yaml_from_cv_and_profile(tmp_path) -> None:
assert payload["summary"] == "Junior data engineer focused on Python and GCP."
assert payload["target_roles"] == ["Data Engineer"]
assert payload["skills"] == ["Python", "SQL", "Terraform", "GCP", "BigQuery"]
assert payload["warnings"][0]["field"] == "years_of_experience"
assert any(item["field"] == "years_of_experience" for item in payload["warnings"])
def test_build_profile_reports_when_no_warnings_are_included(tmp_path) -> None:
@ -143,5 +143,5 @@ def test_build_profile_reports_when_no_warnings_are_included(tmp_path) -> None:
)
assert result.returncode == 0
assert f"candidate-profile.yaml written to {out}" in result.stdout
assert f"candidate profile written to {out}" in result.stdout
assert "No warnings included." in result.stdout