tidy up old code

This commit is contained in:
2026-04-02 00:40:09 -07:00
parent 6bfa295d25
commit 7de9bddec7
39 changed files with 219 additions and 533 deletions

View File

@@ -1,5 +1,6 @@
def test_print_table():
from backend.nodes.print_table import PrintTable
from backend.execution_context import execution_callbacks, active_node
node = PrintTable()
table_spec = PrintTable.INPUT_TYPES()["required"]["table"]
@@ -7,12 +8,8 @@ def test_print_table():
assert table_spec[1]["accepted_types"] == ["DATA_TABLE"]
captured = []
PrintTable._broadcast_table_fn = lambda node_id, rows: captured.append(rows)
PrintTable._current_node_id = "test"
table = [{"quantity": "test", "value": 42.0, "unit": "m"}]
node.print_table(table=table)
assert len(captured) == 1
assert captured[0] == table
PrintTable._broadcast_table_fn = None
with execution_callbacks(table=lambda nid, rows: captured.append(rows)), active_node("test"):
table = [{"quantity": "test", "value": 42.0, "unit": "m"}]
node.print_table(table=table)
assert len(captured) == 1
assert captured[0] == table