test case to tickle bug in wholefiles

This commit is contained in:
Paul Gauthier 2023-07-07 08:25:19 -07:00
parent d0b7753091
commit 40787b3637

View file

@ -27,6 +27,20 @@ class TestWholeFileCoder(unittest.TestCase):
self.patcher.stop()
def test_no_files(self):
# Initialize WholeFileCoder with the temporary directory
io = InputOutput(yes=True)
coder = WholeFileCoder(main_model=models.GPT35, io=io, fnames=[])
coder.partial_response_content = (
'To print "Hello, World!" in most programming languages, you can use the following'
' code:\n\n```python\nprint("Hello, World!")\n```\n\nThis code will output "Hello,'
' World!" to the console.'
)
# This is throwing ValueError!
coder.render_incremental_response(True)
def test_update_files(self):
# Create a sample file in the temporary directory
sample_file = "sample.txt"