MCPcopy Create free account
hub / github.com/bhowiebkr/PyFlowGraph / test_command_undo

Method test_command_undo

tests/test_command_system.py:65–73  ·  view source on GitHub ↗

Test command undo tracking.

(self)

Source from the content-addressed store, hash-verified

63 self.assertFalse(cmd.is_undone())
64
65 def test_command_undo(self):
66 """Test command undo tracking."""
67 cmd = MockCommand()
68 cmd.execute()
69 cmd._mark_executed()
70 self.assertTrue(cmd.undo())
71 cmd._mark_undone()
72 self.assertFalse(cmd.is_executed())
73 self.assertTrue(cmd.is_undone())
74
75 def test_memory_usage_estimation(self):
76 """Test memory usage estimation."""

Callers

nothing calls this directly

Calls 7

executeMethod · 0.95
undoMethod · 0.95
_mark_executedMethod · 0.80
_mark_undoneMethod · 0.80
is_executedMethod · 0.80
is_undoneMethod · 0.80
MockCommandClass · 0.70

Tested by

no test coverage detected