Skip to content

Commit 7a6951c

Browse files
committed
fix(tests): check combined stdout+stderr for conventional commit_style failure test
Write-Warning output stream placement is not deterministic across pwsh versions/platforms (observed failing on macOS CI). Match the existing pattern used elsewhere in this file (e.g. test_not_a_repo_still_detected_with_autocrlf) by asserting against the combined stdout+stderr instead of stderr alone. Assisted-by: GitHub Copilot (model: claude-sonnet-5, autonomous)
1 parent a4ca786 commit 7a6951c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎tests/extensions/git/test_git_extension.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,11 @@ def test_conventional_without_generated_message_fails(self, tmp_path: Path):
12981298
(project / "new-file.txt").write_text("content")
12991299
result = _run_pwsh("auto-commit.ps1", project, "after_specify")
13001300
assert result.returncode != 0
1301-
assert "conventional" in result.stderr.lower()
1301+
# Write-Warning output placement (stdout vs. stderr) is not deterministic
1302+
# across pwsh versions/platforms, so check the combined stream like the
1303+
# other pwsh tests above (e.g. test_not_a_repo_still_detected_with_autocrlf).
1304+
combined = result.stdout + result.stderr
1305+
assert "conventional" in combined.lower()
13021306

13031307
log = subprocess.run(
13041308
["git", "log", "--oneline"],

0 commit comments

Comments
 (0)