Ejemplo n.º 1
0
    def assert_edge_as_obj_added(el: Jelm):

        n = el.get_node("n1")

        assert "n2" in n.neighbors.keys()
        assert "n1" in el.get_node("n2").neighbors
        assert "n2" in n.target_neighbors.keys()
Ejemplo n.º 2
0
    def assert_edge_jelm_obj_added(el: Jelm):

        n = el.get_node("n1")

        assert "n2" in n.neighbors.keys()
        assert "n1" in el.get_node("n2").neighbors
        assert "n2" in n.target_neighbors.keys()

        edge_ids = [e.id for e in n.neighbors["n2"]]

        assert "fing" in edge_ids
Ejemplo n.º 3
0
    def neighbor_check(el: Jelm):

        for nid, n in el.nodes.items():

            for nid2 in n.neighbors.keys():

                assert nid in el.get_node(nid2).neighbors.keys()

            for nid3 in n.target_neighbors.keys():

                assert nid in el.get_node(nid3).source_neighbors.keys()

        return el
Ejemplo n.º 4
0
    def catch_node_as_obj_add(el: Jelm, e):

        assert isinstance(e, ValueError)
        assert isinstance(el.get_node("n10"), Node)
Ejemplo n.º 5
0
 def assert_node_as_obj_added(el: Jelm):
     assert isinstance(el.get_node("n10"), Node)