fix test for windows

This commit is contained in:
Paul Gauthier 2024-06-29 09:13:22 -07:00
parent 27a6006328
commit a888f0dcf2
2 changed files with 5 additions and 7 deletions

View file

@ -95,12 +95,7 @@ class MarkdownStream:
show = lines[num_printed:num_lines]
show = "".join(show)
show = Text.from_ansi(show)
try:
self.live.console.print(show)
except UnicodeEncodeError as err:
print("unicode error", err)
print("show string", repr(show.encode("utf-8")))
raise err
self.live.console.print(show)
self.printed = lines[:num_lines]

View file

@ -288,7 +288,9 @@ after b
files = [file1]
# Initialize the Coder object with the mocked IO and mocked repo
coder = Coder.create(self.GPT35, "whole", io=InputOutput(), fnames=files, stream=False)
coder = Coder.create(
self.GPT35, "whole", io=InputOutput(), fnames=files, stream=False, pretty=False
)
# no trailing newline so the response content below doesn't add ANOTHER newline
new_content = "new\ntwo\nthree"
@ -307,6 +309,7 @@ Do this:
return []
coder.send = MagicMock(side_effect=mock_send)
coder.live_incremental_response = lambda x: x
# Call the run method with a message
coder.run(with_message="hi")