mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
style: Format test_io.py with consistent quotes and spacing
This commit is contained in:
parent
01af629399
commit
8b6863dc40
1 changed files with 5 additions and 5 deletions
|
@ -288,19 +288,19 @@ class TestInputOutputMultilineMode(unittest.TestCase):
|
||||||
def test_tool_message_unicode_fallback(self):
|
def test_tool_message_unicode_fallback(self):
|
||||||
"""Test that Unicode messages are properly converted to ASCII with replacement"""
|
"""Test that Unicode messages are properly converted to ASCII with replacement"""
|
||||||
io = InputOutput(pretty=False, fancy_input=False)
|
io = InputOutput(pretty=False, fancy_input=False)
|
||||||
|
|
||||||
# Create a message with Unicode characters
|
# Create a message with Unicode characters
|
||||||
unicode_message = "Hello こんにちは Привет"
|
unicode_message = "Hello こんにちは Привет"
|
||||||
|
|
||||||
# Mock console.print to capture the output
|
# Mock console.print to capture the output
|
||||||
with patch.object(io.console, 'print') as mock_print:
|
with patch.object(io.console, "print") as mock_print:
|
||||||
io._tool_message(unicode_message)
|
io._tool_message(unicode_message)
|
||||||
|
|
||||||
# Verify that the message was converted to ASCII with replacement
|
# Verify that the message was converted to ASCII with replacement
|
||||||
mock_print.assert_called_once()
|
mock_print.assert_called_once()
|
||||||
args, kwargs = mock_print.call_args
|
args, kwargs = mock_print.call_args
|
||||||
converted_message = args[0]
|
converted_message = args[0]
|
||||||
|
|
||||||
# The Unicode characters should be replaced with '?'
|
# The Unicode characters should be replaced with '?'
|
||||||
self.assertEqual(converted_message, "Hello ????? ?????")
|
self.assertEqual(converted_message, "Hello ????? ?????")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue