Ejemplo n.º 1
0
 def test_simplify_with_subgraphs(self):
     """Harder graphs with subgraphs should simplify correctly."""
     assert graph.simplify(self.graph) == self.simplegraph
Ejemplo n.º 2
0
 def test_simplify_bug(self):
     assert graph.simplify({1: {3: 5.0},
                            2: {1: 10.0, 3: 5.0},
                            3: {2: 15.0}}) == {3: {1: 5.0},
                                               2: {},
                                               1: {}}
Ejemplo n.º 3
0
 def test_simplify_no_subgraphs(self):
     """Easy graphs with no subgraphs should simplify correctly."""
     assert graph.simplify(self.graph) == self.simplegraph