~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_graph.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-01-11 15:45:55 UTC
  • mfrom: (5588.1.1 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20110111154555-xmu386vs0qoigyhl
(vila) Document the packaging helper scripts. (Max Bowsher)

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,
21
20
    tests,
22
21
    )
23
22
from bzrlib.revision import NULL_REVISION
1654
1653
        self.assertEqual(['D'], sorted(graph_thunk.heads(['D', 'C'])))
1655
1654
        self.assertEqual(['B', 'C'], sorted(graph_thunk.heads(['B', 'C'])))
1656
1655
 
 
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
 
1657
1664
 
1658
1665
class TestPendingAncestryResultGetKeys(TestCaseWithMemoryTransport):
1659
1666
    """Tests for bzrlib.graph.PendingAncestryResult."""