MCPcopy Create free account
hub / github.com/easy-graph/Easy-Graph / test_remove_hyperedges

Function test_remove_hyperedges

easygraph/classes/tests/test_hypergraph.py:260–273  ·  view source on GitHub ↗
(g1)

Source from the content-addressed store, hash-verified

258
259
260def test_remove_hyperedges(g1):
261 assert g1.e[0] == [(0, 1, 2, 5), (0, 1), (2, 3, 4)]
262 assert g1.e[1] == [1, 1, 1]
263 g1.remove_hyperedges([0, 1])
264 assert (0, 1) not in g1.e[0]
265 assert (0, 1, 5) not in g1.e[0]
266 g1.add_hyperedges([[0, 1, 5], [2, 3, 4]])
267 assert (0, 1, 5) in g1.e[0]
268 g1.remove_hyperedges([[0, 1, 5], (0, 1, 2, 5)])
269 assert (0, 1, 5) not in g1.e[0]
270 assert (0, 1, 2, 5) not in g1.e[0]
271 g1.clear()
272 assert g1.num_e == 0
273 assert g1.e == ([], [])
274
275
276def test_remove_group(g1):

Callers

nothing calls this directly

Calls 3

remove_hyperedgesMethod · 0.45
add_hyperedgesMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected