(self)
| 6 | |
| 7 | class TestUnifiedDiffCoder(unittest.TestCase): |
| 8 | def test_find_diffs_single_hunk(self): |
| 9 | # Test find_diffs with a single hunk |
| 10 | content = """ |
| 11 | Some 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 |
nothing calls this directly
no test coverage detected