fix: make build-profile output message neutral
This commit is contained in:
parent
d27c58014d
commit
8d232060a0
@ -48,7 +48,7 @@ def build_profile(
|
|||||||
|
|
||||||
save_candidate_profile_yaml(out, candidate_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)
|
warning_count = len(candidate_profile.warnings)
|
||||||
if warning_count:
|
if warning_count:
|
||||||
typer.echo(f"Warnings included: {warning_count}")
|
typer.echo(f"Warnings included: {warning_count}")
|
||||||
|
|||||||
@ -76,7 +76,7 @@ def test_build_profile_writes_yaml_from_cv_and_profile(tmp_path) -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
assert result.returncode == 0
|
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
|
assert "Warnings included: 1" in result.stdout
|
||||||
|
|
||||||
payload = load_yaml(out)
|
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["summary"] == "Junior data engineer focused on Python and GCP."
|
||||||
assert payload["target_roles"] == ["Data Engineer"]
|
assert payload["target_roles"] == ["Data Engineer"]
|
||||||
assert payload["skills"] == ["Python", "SQL", "Terraform", "GCP", "BigQuery"]
|
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:
|
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 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
|
assert "No warnings included." in result.stdout
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user