Skip to content

Commit

Permalink
test(patch): improve test coverage for patch tool
Browse files Browse the repository at this point in the history
- Rename test_clear_file to test_apply_clear_file for clarity
- Add test_apply_rm_function to test function removal functionality
  • Loading branch information
ErikBjare committed Nov 22, 2024
1 parent a660512 commit e1e2943
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/test_tools_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,19 @@ def hello(name="world"):
)


def test_clear_file():
def test_apply_clear_file():
content = "test"
codeblock = """
<<<<<<< ORIGINAL
test
=======
>>>>>>> UPDATED
"""
result = apply(codeblock, content)
assert result == ""


def test_apply_rm_function():
# only remove code in patch
content = """
def hello():
Expand Down

0 comments on commit e1e2943

Please sign in to comment.