DEVX-1: fix: fix post-merge job failures (configure-repo, badges, notify-failure)
This commit is contained in:
@@ -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", {})
|
||||
|
||||
Reference in New Issue
Block a user