Skip to content

Commit

Permalink
Try debugging test_hierarchy_pos test internals
Browse files Browse the repository at this point in the history
  • Loading branch information
donRumata03 committed Apr 18, 2024
1 parent 60f2557 commit 22fd62b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/unit/visualisation/test_visualisation_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,13 @@ def test_hierarchy_pos():
node_labels = {uid: str(node) for uid, node in nodes_dict.items()}

pos = GraphVisualizer._get_hierarchy_pos_by_distance_to_primary_level(nx_graph, nodes_dict)
print("pos:", pos)
comparable_lists_y = make_comparable_lists(pos, real_hierarchy_levels_y,
node_labels, 1, reverse=True)
comparable_lists_x = make_comparable_lists(pos, real_hierarchy_levels_x,
node_labels, 0, reverse=False)
print("x:", comparable_lists_x)
print("y:", comparable_lists_y)
assert comparable_lists_y[0] == comparable_lists_y[1] # check nodes hierarchy by y axis
assert comparable_lists_x[0] == comparable_lists_x[1] # check nodes hierarchy by x axis

Expand Down

0 comments on commit 22fd62b

Please sign in to comment.