~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_graph.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-02-23 17:00:36 UTC
  • mfrom: (4032.1.4 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090223170036-3q1v68ewdt8i0to5
(Marius Kruger) Remove all trailing whitespace and add tests to
        enforce this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
237
237
                    'e':['d'], 'f':['e'], 'g':['f'], 'h':['d'], 'i':['g'],
238
238
                    'j':['h'], 'k':['h', 'i'], 'l':['k'], 'm':['l'], 'n':['m'],
239
239
                    'o':['n'], 'p':['o'], 'q':['p'], 'r':['q'], 's':['r'],
240
 
                    't':['i', 's'], 'u':['s', 'j'], 
 
240
                    't':['i', 's'], 'u':['s', 'j'],
241
241
                    }
242
242
 
243
243
# Graph where different walkers will race to find the common and uncommon
711
711
 
712
712
    def test_is_ancestor_boundary(self):
713
713
        """Ensure that we avoid searching the whole graph.
714
 
        
 
714
 
715
715
        This requires searching through b as a common ancestor, so we
716
716
        can identify that e is common.
717
717
        """
737
737
        # 'a' is not in the ancestry of 'c', and 'g' is a ghost
738
738
        expected['g'] = None
739
739
        self.assertEqual(expected, dict(graph.iter_ancestry(['a', 'c'])))
740
 
        expected.pop('a') 
 
740
        expected.pop('a')
741
741
        self.assertEqual(expected, dict(graph.iter_ancestry(['c'])))
742
742
 
743
743
    def test_filter_candidate_lca(self):
845
845
 
846
846
    def _run_heads_break_deeper(self, graph_dict, search):
847
847
        """Run heads on a graph-as-a-dict.
848
 
        
 
848
 
849
849
        If the search asks for the parents of 'deeper' the test will fail.
850
850
        """
851
851
        class stub(object):