DEVX-1: fix: fix post-merge job failures (configure-repo, badges, notify-failure)

This commit is contained in:
emil
2026-06-22 16:08:27 +00:00
parent 31bfd23fea
commit 6ebb48f9e8
4 changed files with 14 additions and 4 deletions
+10
View File
@@ -283,6 +283,16 @@ class TestRunTests:
with pytest.raises(click.ClickException, match="Tests failed"):
run_tests()
@patch("devx.ci.release.run_cmd")
def test_tests_fail_stdout_fallback(self, mock_run_cmd: MagicMock) -> None:
"""When stderr is empty, test output from stdout is used in the error message."""
mock_run_cmd.side_effect = [
MagicMock(returncode=0, stdout="", stderr=""), # lint passes
MagicMock(returncode=1, stdout="test failure on stdout", stderr=""), # tests fail, stderr empty
]
with pytest.raises(click.ClickException, match="test failure on stdout"):
run_tests()
class TestMain:
@patch.dict("os.environ", {})