(g1)
| 424 | |
| 425 | |
| 426 | def test_e2v_index_group(g1): |
| 427 | import torch |
| 428 | |
| 429 | e2v_src = g1.e2v_src_of_group("main").view(-1, 1) |
| 430 | e2v_dst = g1.e2v_dst_of_group("main").view(-1, 1) |
| 431 | |
| 432 | index = torch.cat((e2v_src, e2v_dst), dim=1) |
| 433 | index = index.numpy().tolist() |
| 434 | index = list(map(lambda x: tuple(x), index)) |
| 435 | |
| 436 | assert (0, 0) in index |
| 437 | assert (0, 1) in index |
| 438 | assert (0, 2) in index |
| 439 | assert (0, 5) in index |
| 440 | assert (1, 0) in index |
| 441 | assert (1, 1) in index |
| 442 | assert (2, 2) in index |
| 443 | assert (2, 3) in index |
| 444 | assert (2, 4) in index |
| 445 | |
| 446 | |
| 447 | def test_H(g1): |
nothing calls this directly
no test coverage detected