MCPcopy
hub / github.com/dmlc/dgl / test_peptides_structural

Function test_peptides_structural

tests/integration/test_data.py:65–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63 dgl.backend.backend_name != "pytorch", reason="only supports pytorch"
64)
65def test_peptides_structural():
66 transform = dgl.AddSelfLoop(allow_duplicate=True)
67 dataset1 = data.PeptidesStructuralDataset()
68 g1 = dataset1[0][0]
69 dataset2 = data.PeptidesStructuralDataset(transform=transform)
70 g2 = dataset2[0][0]
71
72 assert g2.num_edges() - g1.num_edges() == g1.num_nodes()
73
74
75@unittest.skipIf(

Callers

nothing calls this directly

Calls 2

num_edgesMethod · 0.45
num_nodesMethod · 0.45

Tested by

no test coverage detected