You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests: more Agentskills tests; updated .gitignore (OpenHands#2307)
* added tests related to backticks
* updated .gitignore
* added extra linter test for OpenHands#2210
* hotfix for integration test
---------
Co-authored-by: Engel Nyst <[email protected]>
MSG_FILE_UPDATED='[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]'
f'[File: {os.path.abspath(CURRENT_FILE)} ({n_total_lines} lines total after edit)]'
352
356
)
353
357
_print_window(CURRENT_FILE, CURRENT_LINE, WINDOW)
354
-
print(
355
-
'[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]'
'Your changes have NOT been applied. Please fix your edit command and try again.\n'
394
+
'You either need to 1) Specify the correct start/end line arguments or 2) Correct your edit code.\n'
395
+
'DO NOT re-run the same failed edit command. Running it again will lead to the same error.\n'
396
+
)
397
+
assertresult==expected
398
+
399
+
277
400
deftest_edit_file(tmp_path):
278
401
temp_file_path=tmp_path/'a.txt'
279
402
content='Line 1\nLine 2\nLine 3\nLine 4\nLine 5'
@@ -289,8 +412,7 @@ def test_edit_file(tmp_path):
289
412
f'[File: {temp_file_path} (3 lines total after edit)]\n'
290
413
'1|REPLACE TEXT\n'
291
414
'2|Line 4\n'
292
-
'3|Line 5\n'
293
-
'[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]\n'
f'[File: {temp_file_path} (1 lines total after edit)]\n'
316
-
'1|REPLACE TEXT\n'
317
-
'[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]\n'
f'[File: {temp_file_path} (3 lines total after edit)]\n'
342
522
'1|REPLACE TEXT1\n'
343
523
'2|REPLACE TEXT2\n'
344
-
'3|REPLACE TEXT3\n'
345
-
'[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]\n'
f'[File: {file_path} (2 lines total after edit)]\n'
552
731
"1|print('hello')\n"
553
-
'2|\n'
554
-
'[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]\n'
f'[File: {file_path} (2 lines total after edit)]\n'
680
858
'1|undefined_name()\n'
681
-
'2|\n'
682
-
'[File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]\n'
0 commit comments