Skip to content

Commit

Permalink
fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
enyst committed May 14, 2024
1 parent 2aa663e commit a379289
Show file tree
Hide file tree
Showing 12 changed files with 620 additions and 37 deletions.
10 changes: 5 additions & 5 deletions tests/integration/mock/CodeActAgent/test_edits/prompt_002.log
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ ENVIRONMENT REMINDER: You have 98 turns left to complete the task.

----------

Certainly! I will start by opening the file `bad.txt` to see the content and then proceed to fix the typos.
Sure! Let's start by opening the `bad.txt` file to see its contents.

<execute_bash>
open bad.txt
Expand All @@ -237,10 +237,10 @@ open bad.txt
----------

OBSERVATION:
[File: /workspace/bad.txt (4 lines total)]
1:This is a stupid typoo.
2:Really?
3:No mor typos!
[File: /workplace/bad.txt (4 lines total)]
1:This is a stupid typoo.
2:Really?
3:No mor typos!
4:Enjoy!
[Command -1 finished with exit code 0]]

Expand Down
33 changes: 13 additions & 20 deletions tests/integration/mock/CodeActAgent/test_edits/prompt_003.log
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ ENVIRONMENT REMINDER: You have 98 turns left to complete the task.

----------

Certainly! I will start by opening the file `bad.txt` to see the content and then proceed to fix the typos.
Sure! Let's start by opening the `bad.txt` file to see its contents.

<execute_bash>
open bad.txt
Expand All @@ -237,42 +237,35 @@ open bad.txt
----------

OBSERVATION:
[File: /workspace/bad.txt (4 lines total)]
1:This is a stupid typoo.
2:Really?
3:No mor typos!
[File: /workplace/bad.txt (4 lines total)]
1:This is a stupid typoo.
2:Really?
3:No mor typos!
4:Enjoy!
[Command -1 finished with exit code 0]]

ENVIRONMENT REMINDER: You have 97 turns left to complete the task.

----------

I will now edit the file to correct the typos.
Let's correct the typos in the `bad.txt` file.

<execute_bash>
edit 1:1
edit 1:3
This is a stupid typo.
end_of_edit
edit 3:3
Really?
No more typos!
end_of_edit
</execute_bash>

----------

OBSERVATION:
> > [File: /workspace/bad.txt (4 lines total)]
1:This is a stupid typo.
2:Really?
3:No mor typos!
4:Enjoy!
File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.
> > [File: /workspace/bad.txt (4 lines total)]
1:This is a stupid typo.
2:Really?
3:No more typos!
4:Enjoy!
> > > > [File: /workplace/bad.txt (4 lines total)]
1:This is a stupid typo.
2:Really?
3:No more typos!
4:Enjoy!
File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.
[Command -1 finished with exit code 0]]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Certainly! I will start by opening the file `bad.txt` to see the content and then proceed to fix the typos.
Sure! Let's start by opening the `bad.txt` file to see its contents.

<execute_bash>
open bad.txt

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
I will now edit the file to correct the typos.
Let's correct the typos in the `bad.txt` file.

<execute_bash>
edit 1:1
edit 1:3
This is a stupid typo.
end_of_edit
edit 3:3
Really?
No more typos!
end_of_edit

Original file line number Diff line number Diff line change
@@ -1 +1 @@
The typos in `bad.txt` have been fixed. The task is complete. If you need further assistance, feel free to ask!
The typos in `bad.txt` have been fixed. If you need any further assistance, feel free to ask!
20 changes: 17 additions & 3 deletions tests/integration/mock/CodeActAgent/test_ipython/prompt_002.log
Original file line number Diff line number Diff line change
Expand Up @@ -228,17 +228,31 @@ ENVIRONMENT REMINDER: You have 98 turns left to complete the task.

----------

Certainly! I will write the text 'hello world' to the file `/workspace/test.txt` using Jupyter IPython.
Sure! I'll write the text 'hello world' to the file `/workspace/test.txt`.

<execute_ipython>
# Write 'hello world' to the specified text file
with open('/workspace/test.txt', 'w') as file:
file.write('hello world')
</execute_ipython>

----------

OBSERVATION:
[Code executed successfully with no output]
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[1], line 1
----> 1 with open('/workspace/test.txt', 'w') as file:
2 file.write('hello world')

File /usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py:324, in _modified_open(file, *args, **kwargs)
317 if file in {0, 1, 2}:
318 raise ValueError(
319 f"IPython won't let you open fd={file} by default "
320 "as it is likely to crash IPython. If you know what you are doing, "
321 "you can use builtins' open."
322 )
--> 324 return io_open(file, *args, **kwargs)

FileNotFoundError: [Errno 2] No such file or directory: '/workspace/test.txt'

ENVIRONMENT REMINDER: You have 97 turns left to complete the task.

0 comments on commit a379289

Please sign in to comment.