()
| 51 | |
| 52 | |
| 53 | def test_from_graph(): |
| 54 | g = eg.Graph() |
| 55 | g.add_nodes(range(0, 5)) |
| 56 | g.add_edges( |
| 57 | [(0, 1), (0, 3), (1, 4), (2, 3), (3, 4)], |
| 58 | [ |
| 59 | {"weight": 1.0}, |
| 60 | {"weight": 1.0}, |
| 61 | {"weight": 1.0}, |
| 62 | {"weight": 1.0}, |
| 63 | {"weight": 1.0}, |
| 64 | ], |
| 65 | ) |
| 66 | hg = eg.Hypergraph.from_graph(g) |
| 67 | assert hg.num_e == 5 |
| 68 | assert (0, 1) in hg.e[0] |
| 69 | assert (1, 4) in hg.e[0] |
| 70 | |
| 71 | |
| 72 | def test_from_graph_kHop(): |
nothing calls this directly
no test coverage detected