Esempio n. 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})
Esempio n. 2
0
 def test_empty_subgraph(self):
     with self.assertRaises(ValueError):
         Subgraph()
Esempio n. 3
0
 def test_empty_subgraph(self):
     s = Subgraph()
     assert len(s.nodes) == 0
     assert len(s.relationships) == 0