def atypes_node_setup_min_test(): mem = MockMemory() node = Node(mem, 0x42) node.setup_min(1234, 5678) # check node assert node.get_succ() == 1234 assert node.get_pred() == 5678
def atypes_node_str_test(): mem = MockMemory() text = 'hello, world!' mem.w_cstr(12, text) node = Node(mem, 0x42) node.setup(0x1234, 0x5678, NodeType.NT_DEVICE, -5, 12) assert str(node) == \ "[Node:@000042,p=005678,s=001234,NT_DEVICE,-5,'hello, world!']" min_node = Node(mem, 0x80, True) min_node.setup_min(0x1234, 0x5678) assert str(min_node) == "[MinNode:@000080,p=005678,s=001234]"