/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 bzrlib/tests/test_graph.py

Move all features to bzrlib.tests.features in 2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    )
22
22
from bzrlib.revision import NULL_REVISION
23
23
from bzrlib.tests import TestCaseWithMemoryTransport
24
 
from bzrlib.symbol_versioning import deprecated_in
25
24
 
26
25
 
27
26
# Ancestry 1:
1647
1646
        self.assertEqual(['B', 'D'],
1648
1647
            sorted(graph_thunk.heads(['D', 'B', 'A'])))
1649
1648
 
 
1649
    def test_merge_sort(self):
 
1650
        d = {('C',):[('A',)], ('B',): [('A',)], ('A',): []}
 
1651
        g = _mod_graph.KnownGraph(d)
 
1652
        graph_thunk = _mod_graph.GraphThunkIdsToKeys(g)
 
1653
        graph_thunk.add_node("D", ["A", "C"])
 
1654
        self.assertEqual([('C', 0, (2,), False), ('A', 0, (1,), True)],
 
1655
            [(n.key, n.merge_depth, n.revno, n.end_of_merge)
 
1656
                 for n in graph_thunk.merge_sort('C')])
 
1657
 
1650
1658
 
1651
1659
class TestPendingAncestryResultGetKeys(TestCaseWithMemoryTransport):
1652
1660
    """Tests for bzrlib.graph.PendingAncestryResult."""