~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_graph.py

  • Committer: Jelmer Vernooij
  • Date: 2010-12-20 11:57:14 UTC
  • mto: This revision was merged to the branch mainline in revision 5577.
  • Revision ID: jelmer@samba.org-20101220115714-2ru3hfappjweeg7q
Don't use no-plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1654
1654
        self.assertEqual(['D'], sorted(graph_thunk.heads(['D', 'C'])))
1655
1655
        self.assertEqual(['B', 'C'], sorted(graph_thunk.heads(['B', 'C'])))
1656
1656
 
 
1657
    def test_add_node(self):
 
1658
        d = {('C',):[('A',)], ('B',): [('A',)], ('A',): []}
 
1659
        g = _mod_graph.KnownGraph(d)
 
1660
        graph_thunk = _mod_graph.GraphThunkIdsToKeys(g)
 
1661
        graph_thunk.add_node("D", ["A", "C"])
 
1662
        self.assertEqual(['B', 'D'],
 
1663
            sorted(graph_thunk.heads(['D', 'B', 'A'])))
 
1664
 
1657
1665
 
1658
1666
class TestPendingAncestryResultGetKeys(TestCaseWithMemoryTransport):
1659
1667
    """Tests for bzrlib.graph.PendingAncestryResult."""