MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / test_undo_roundtrip

Method test_undo_roundtrip

tests/test_patch.py:33–41  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
43if __name__ == "__main__":
44 unittest.main()

Callers

nothing calls this directly

Calls 2

tool_patch_fileFunction · 0.90
undoFunction · 0.90

Tested by

no test coverage detected