~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_graph.py

  • Committer: John Arbash Meinel
  • Date: 2010-09-29 20:56:18 UTC
  • mto: This revision was merged to the branch mainline in revision 5452.
  • Revision ID: john@arbash-meinel.com-20100929205618-qlldxw4ykwt5511n
Move the new NEWS entry to the appropriate section.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
from bzrlib import (
18
18
    errors,
19
19
    graph as _mod_graph,
 
20
    symbol_versioning,
20
21
    tests,
21
22
    )
22
23
from bzrlib.revision import NULL_REVISION
1653
1654
        self.assertEqual(['D'], sorted(graph_thunk.heads(['D', 'C'])))
1654
1655
        self.assertEqual(['B', 'C'], sorted(graph_thunk.heads(['B', 'C'])))
1655
1656
 
1656
 
    def test_add_node(self):
1657
 
        d = {('C',):[('A',)], ('B',): [('A',)], ('A',): []}
1658
 
        g = _mod_graph.KnownGraph(d)
1659
 
        graph_thunk = _mod_graph.GraphThunkIdsToKeys(g)
1660
 
        graph_thunk.add_node("D", ["A", "C"])
1661
 
        self.assertEqual(['B', 'D'],
1662
 
            sorted(graph_thunk.heads(['D', 'B', 'A'])))
1663
 
 
1664
1657
 
1665
1658
class TestPendingAncestryResultGetKeys(TestCaseWithMemoryTransport):
1666
1659
    """Tests for bzrlib.graph.PendingAncestryResult."""