mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
fix tests and bug
This commit is contained in:
parent
fe4a2836b7
commit
6133eb61c1
2 changed files with 6 additions and 3 deletions
|
@ -4,10 +4,10 @@ from aider.utils import replace_most_similar_chunk, strip_quoted_wrapping
|
|||
|
||||
class TestUtils(unittest.TestCase):
|
||||
def test_replace_most_similar_chunk(self):
|
||||
whole = "This is a sample text.\nAnother line of text.\nYet another line."
|
||||
whole = "This is a sample text.\nAnother line of text.\nYet another line.\n"
|
||||
part = "This is a sample text"
|
||||
replace = "This is a replaced text."
|
||||
expected_output = "This is a replaced text.\nAnother line of text.\nYet another line."
|
||||
expected_output = "This is a replaced text..\nAnother line of text.\nYet another line.\n"
|
||||
|
||||
result = replace_most_similar_chunk(whole, part, replace)
|
||||
self.assertEqual(result, expected_output)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue