Skip to content

Commit

Permalink
Fix ProgressPrint test case when stdout is not a TTY
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoWilken committed Feb 26, 2024
1 parent de3b29f commit 56ed1c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def test_dieOnError(self, mock_sys, mock_error):
mock_error.assert_not_called()
mock_sys.exit.assert_not_called()

@patch("alibuild_helpers.log.sys.stderr", new=MagicMock(return_value=True))
@patch("sys.stdout.isatty", new=MagicMock(return_value=True))
@patch("sys.stderr", new=MagicMock(return_value=True))
def test_ProgressPrint(self):
"""Make sure ProgressPrint updates correctly."""
# ProgressPrint only parses messages every 0.5s. Trick it into thinking
Expand Down

0 comments on commit 56ed1c6

Please sign in to comment.