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

Method test_create_node_undo

tests/test_command_system.py:245–254  ·  view source on GitHub ↗

Test undoing node creation.

(self)

Source from the content-addressed store, hash-verified

243 self.assertEqual(cmd.created_node.pos(), self.test_position)
244
245 def test_create_node_undo(self):
246 """Test undoing node creation."""
247 cmd = CreateNodeCommand(self.node_graph, "TestNode", self.test_position)
248 cmd.execute()
249 initial_count = len(self.node_graph.nodes)
250
251 success = cmd.undo()
252
253 self.assertTrue(success)
254 self.assertEqual(len(self.node_graph.nodes), initial_count - 1)
255
256 def test_delete_node_command(self):
257 """Test node deletion command."""

Callers

nothing calls this directly

Calls 3

executeMethod · 0.95
undoMethod · 0.95
CreateNodeCommandClass · 0.90

Tested by

no test coverage detected