MCPcopy Index your code
hub / github.com/bhowiebkr/PyFlowGraph / test_code_management

Method test_code_management

tests/test_node_system.py:98–112  ·  view source on GitHub ↗

Test node code setting and management.

(self)

Source from the content-addressed store, hash-verified

96 self.assertEqual(node.color_body, new_color)
97
98 def test_code_management(self):
99 """Test node code setting and management."""
100 node = Node("Code Node")
101
102 # Test setting basic code
103 test_code = '''
104@node_entry
105def test_function(x: int) -> str:
106 return str(x * 2)
107'''
108 node.set_code(test_code)
109 self.assertEqual(node.code, test_code)
110
111 # Test function name extraction
112 self.assertEqual(node.function_name, "test_function")
113
114 def test_pin_generation_from_code(self):
115 """Test automatic pin generation from function signatures."""

Callers

nothing calls this directly

Calls 2

set_codeMethod · 0.95
NodeClass · 0.90

Tested by

no test coverage detected