def runTest(self): bqt = MyGraph(**self.data["bouquet"]) digon = MyGraph(**self.data["2-gon"]) tri = MyGraph(**self.data["3-gon"]) self.assertEqual(len(bqt.subgraph_find(digon)), 1) self.assertEqual(len(bqt.subgraph_find(tri)), 0) self.assertEqual(len(tri.subgraph_find(tri, first_match_only=False)), 6)
def runTest(self): tri = MyGraph(**self.data["3-gon"]) k4 = MyGraph(graphs.CompleteGraph(4)) self.assertEqual(len(k4.subgraph_find(tri, first_match_only=False)), 24)