Skip to content

Commit

Permalink
Tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rusiaaman committed Dec 21, 2024
1 parent 3f700f0 commit 0e13edc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestTools(unittest.TestCase):
def test_render_terminal_output(self):
def test_render_terminal_output(self) -> None:
# Simulated terminal output
terminal_output = (
"\x1b[1;31mHello\x1b[0m\nThis is a test\n\x1b[2K\rLine to clear\n"
Expand All @@ -14,9 +14,7 @@ def test_render_terminal_output(self):
expected_result = "Hello\nThis is a test\nLine to clear"
result = render_terminal_output(terminal_output)
# Stripping extra whitespace and ensuring content matches
self.assertEqual(
"\n".join(line.strip() for line in result.splitlines()), expected_result
)
self.assertEqual("\n".join(line.strip() for line in result), expected_result)

@patch("builtins.input", return_value="y")
def test_ask_confirmation_yes(self, mock_input):
Expand Down

0 comments on commit 0e13edc

Please sign in to comment.