MCPcopy
hub / github.com/Aider-AI/aider / test_find_diffs_single_hunk

Method test_find_diffs_single_hunk

tests/basic/test_udiff.py:8–27  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6
7class TestUnifiedDiffCoder(unittest.TestCase):
8 def test_find_diffs_single_hunk(self):
9 # Test find_diffs with a single hunk
10 content = """
11Some text...
12
13```diff
14--- file.txt
15+++ file.txt
16@@ ... @@
17-Original
18+Modified
19```
20"""
21 edits = find_diffs(content)
22 dump(edits)
23 self.assertEqual(len(edits), 1)
24
25 edit = edits[0]
26 self.assertEqual(edit[0], "file.txt")
27 self.assertEqual(edit[1], ["-Original\n", "+Modified\n"])
28
29 def test_find_diffs_dev_null(self):
30 # Test find_diffs with a single hunk

Callers

nothing calls this directly

Calls 2

find_diffsFunction · 0.90
dumpFunction · 0.90

Tested by

no test coverage detected