/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_tsort.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-12 01:41:38 UTC
  • mto: (7143.16.20 even-more-cleanups)
  • mto: This revision was merged to the branch mainline in revision 7175.
  • Revision ID: jelmer@jelmer.uk-20181112014138-3b0zyx91cu3wdq3k
More PEP8 fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
                         list(TopoSorter(graph).iter_topo_order()))
35
35
 
36
36
    def assertSortAndIterateRaise(self, exception_type, graph):
37
 
        """Try both iterating and topo_sorting graph and expect an exception."""
 
37
        """Try iterating and topo_sorting graph and expect an exception."""
38
38
        self.assertRaises(exception_type, topo_sort, graph)
39
39
        self.assertRaises(exception_type,
40
40
                          list,
99
99
    def test_tsort_partial(self):
100
100
        """Topological sort with partial ordering.
101
101
 
102
 
        Multiple correct orderings are possible, so test for 
 
102
        Multiple correct orderings are possible, so test for
103
103
        correctness, not for exact match on the resulting list.
104
104
        """
105
105
        self.assertSortAndIterateOrder([(0, []),
123
123
 
124
124
    def assertSortAndIterate(self, graph, branch_tip, result_list,
125
125
                             generate_revno, mainline_revisions=None):
126
 
        """Check that merge based sorting and iter_topo_order on graph works."""
 
126
        """Check that merge based sort and iter_topo_order on graph works."""
127
127
        value = merge_sort(graph, branch_tip,
128
128
                           mainline_revisions=mainline_revisions,
129
129
                           generate_revno=generate_revno)
494
494
        # C 2 [D]
495
495
        # D 1 [E]
496
496
        # E 0
497
 
        # with a mainline of NONE,E,A (the inferred one) this will show the merge
498
 
        # depths above.
 
497
        # with a mainline of NONE,E,A (the inferred one) this will show the
 
498
        # merge depths above.
499
499
        # with a overriden mainline of NONE,E,D,B,A it should show:
500
500
        # A 0
501
501
        # B 0