/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

  • Committer: John Arbash Meinel
  • Date: 2011-01-10 22:20:12 UTC
  • mfrom: (5582 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5599.
  • Revision ID: john@arbash-meinel.com-20110110222012-mtcqudkvmzwiufuc
Merge in the bzr.dev 5582

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007-2010 Canonical Ltd
 
1
# Copyright (C) 2007-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
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."""