def test_delete_link(test_nodenet): nodes = prepare_nodenet(test_nodenet) success, link = micropsi.add_link(test_nodenet, nodes['a'], "por", nodes['b'], "gen", 0.5, 1) assert success micropsi.delete_link(test_nodenet, nodes['a'], "por", nodes['b'], "gen") nodespace = micropsi.get_nodenet_data(test_nodenet, None) assert len(nodespace["links"]) == 0
def test_remove_monitored_link(fixed_nodenet): uid = micropsi.add_link_monitor(fixed_nodenet, 'n0005', 'gen', 'n0003', 'gen', 'weight', 'Testmonitor') micropsi.delete_link(fixed_nodenet, 'n0005', 'gen', 'n0003', 'gen') micropsi.step_nodenet(fixed_nodenet) monitor = micropsi.export_monitor_data(fixed_nodenet) assert monitor[uid]['values'][1] is None
def test_delete_link(test_nodenet): nodes = prepare_nodenet(test_nodenet) success, link = micropsi.add_link(test_nodenet, nodes['a'], "por", nodes['b'], "gen", 0.5, 1) assert success micropsi.delete_link(test_nodenet, nodes['a'], "por", nodes['b'], "gen") nodespace = micropsi.get_nodes(test_nodenet) assert nodespace['nodes'][nodes['a']]['links'] == {}
def delete_link(nodenet_uid, source_node_uid, gate_type, target_node_uid, slot_type): return runtime.delete_link(nodenet_uid, source_node_uid, gate_type, target_node_uid, slot_type)
def test_delete_link(test_nodenet): micropsi.delete_link(test_nodenet, "ret_cb") nodespace = micropsi.get_nodespace(test_nodenet, "Root", -1) assert len(nodespace["links"]) == 1 assert "ret_cb" not in nodespace["links"]
def delete_link(nodenet_uid, link_uid): return runtime.delete_link(nodenet_uid, link_uid)
def test_delete_link(test_nodenet): success, link = micropsi.add_link(test_nodenet, "node_a", "por", "node_b", "gen", 0.5, 1) micropsi.delete_link(test_nodenet, "node_a", "por", "node_b", "gen") nodespace = micropsi.get_nodespace(test_nodenet, "Root", -1) assert len(nodespace["links"]) == 1
def delete_link(nodenet_uid, source_node_uid, gate_type, target_node_uid, slot_type): """ Delete the given link""" return runtime.delete_link(nodenet_uid, source_node_uid, gate_type, target_node_uid, slot_type)