(self)
| 31 | self.assertIn("[ERROR] String not found", res) |
| 32 | |
| 33 | def test_undo_roundtrip(self): |
| 34 | # Initial state |
| 35 | initial_content = self.test_file.read_text() |
| 36 | # Patch |
| 37 | tool_patch_file(str(self.test_file), "line 1", "LINE 1") |
| 38 | self.assertEqual(self.test_file.read_text(), "LINE 1\nline 2\nline 2\nline 3") |
| 39 | # Undo |
| 40 | undo(str(self.test_file)) |
| 41 | self.assertEqual(self.test_file.read_text(), initial_content) |
| 42 | |
| 43 | if __name__ == "__main__": |
| 44 | unittest.main() |
nothing calls this directly
no test coverage detected