mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
added test_no_files_new_file_should_ask
This commit is contained in:
parent
61e9003ce0
commit
d8e125f552
1 changed files with 11 additions and 0 deletions
|
@ -41,6 +41,17 @@ class TestWholeFileCoder(unittest.TestCase):
|
|||
# This is throwing ValueError!
|
||||
coder.render_incremental_response(True)
|
||||
|
||||
def test_no_files_new_file_should_ask(self):
|
||||
io = InputOutput(yes=False) # <- yes=FALSE
|
||||
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\nfoo.js\n```python\nprint("Hello, World!")\n```\n\nThis code will output'
|
||||
' "Hello, World!" to the console.'
|
||||
)
|
||||
coder.update_files()
|
||||
self.assertFalse(Path("foo.js").exists())
|
||||
|
||||
def test_update_files(self):
|
||||
# Create a sample file in the temporary directory
|
||||
sample_file = "sample.txt"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue