From 40787b36379f174cf45f0c1e8dad2c768ea22eae Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 7 Jul 2023 08:25:19 -0700 Subject: [PATCH] test case to tickle bug in wholefiles --- tests/test_wholefile.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test_wholefile.py b/tests/test_wholefile.py index de85e04c8..4fbcf8ca9 100644 --- a/tests/test_wholefile.py +++ b/tests/test_wholefile.py @@ -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"