示例#1
0
 def test_can_infer_nodes_through_relationships(self):
     s = Subgraph([], [alice_knows_bob])
     self.assertSetEqual(s.nodes, {alice, bob})
     self.assertSetEqual(s.relationships, {alice_knows_bob})
示例#2
0
 def test_empty_subgraph(self):
     with self.assertRaises(ValueError):
         Subgraph()
示例#3
0
 def test_empty_subgraph(self):
     s = Subgraph()
     assert len(s.nodes) == 0
     assert len(s.relationships) == 0