Skip to content

Commit

Permalink
try fix a couple of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyaoww committed Feb 11, 2025
1 parent 7af01d2 commit 6b031d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/runtime/test_aci_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def test_str_replace(temp_dir, runtime_cls, run_as_openhands):
new_str='sample file',
)
obs = runtime.run_action(action)
assert 'The file has been edited' in obs.content
assert f'The file {test_file} has been edited' in obs.content

# Verify file content
action = FileEditAction(
Expand Down Expand Up @@ -353,7 +353,7 @@ def test_str_replace_with_empty_old_str(temp_dir, runtime_cls, run_as_openhands)
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
assert (
obs.content
== """No replacement was performed. Multiple occurrences of old_str `` in lines [1, 2, 3]. Please ensure it is unique."""
== """No replacement was performed. Multiple occurrences of old_str `` in lines [1, 2, 3, 4]. Please ensure it is unique."""
)
finally:
_close_test_runtime(runtime)
Expand All @@ -367,6 +367,8 @@ def test_str_replace_with_none_old_str(temp_dir, runtime_cls, run_as_openhands):
content='Line 1\nLine 2\nLine 3',
path=test_file,
)
runtime.run_action(action)

action = FileEditAction(
command='str_replace',
path=test_file,
Expand Down

0 comments on commit 6b031d0

Please sign in to comment.