()
| 129 | |
| 130 | |
| 131 | def test_custom_graph_layout_dict(): |
| 132 | G = Graph( |
| 133 | [1, 2, 3], [(1, 2), (2, 3)], layout={1: [0, 0, 0], 2: [1, 1, 0], 3: [1, -1, 0]} |
| 134 | ) |
| 135 | assert str(G) == "Undirected graph on 3 vertices and 2 edges" |
| 136 | assert all(G.vertices[1].get_center() == [0, 0, 0]) |
| 137 | assert all(G.vertices[2].get_center() == [1, 1, 0]) |
| 138 | assert all(G.vertices[3].get_center() == [1, -1, 0]) |
| 139 | |
| 140 | |
| 141 | def test_graph_layouts(): |
nothing calls this directly
no test coverage detected