Set up test fixtures with real instances.
(self)
| 113 | cls.app = QApplication.instance() |
| 114 | |
| 115 | def setUp(self): |
| 116 | """Set up test fixtures with real instances.""" |
| 117 | # Create a real NodeGraph for testing |
| 118 | self.graph = NodeGraph() |
| 119 | |
| 120 | # Create real nodes for testing |
| 121 | self.node1 = Node("Test Node") |
| 122 | self.node2 = Node("Another Node") |
| 123 | |
| 124 | # Add nodes to graph |
| 125 | self.graph.addItem(self.node1) |
| 126 | self.graph.addItem(self.node2) |
| 127 | |
| 128 | # Set up node code to ensure they have pins |
| 129 | self.node1.set_code("def test():\n return 42") |
| 130 | self.node2.set_code("def process(value):\n return value * 2") |
| 131 | |
| 132 | # Create connections between nodes if pins exist |
| 133 | self.connection1 = None |
| 134 | self.connection2 = None |
| 135 | |
| 136 | if self.node1.output_pins and self.node2.input_pins: |
| 137 | self.connection1 = Connection( |
| 138 | self.node1.output_pins[0], |
| 139 | self.node2.input_pins[0], |
| 140 | self.graph |
| 141 | ) |
| 142 | self.graph.addItem(self.connection1) |
| 143 | |
| 144 | def test_delete_single_node_description(self): |
| 145 | """Test description generation for single node deletion.""" |
nothing calls this directly
no test coverage detected