~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to testweave.py

  • Committer: Martin Pool
  • Date: 2005-06-30 08:40:59 UTC
  • mto: This revision was merged to the branch mainline in revision 852.
  • Revision ID: mbp@sourcefrog.net-20050630084059-d6eb6cb46972365b
Rename Weave.get_included to inclusions and getiter to get_iter

Refactor annotate() code 

Show diffs side-by-side

added added

removed removed

Lines of Context:
510
510
                         ["first line",
511
511
                          "alternative second line"])
512
512
 
513
 
        self.assertEqual(k.get_included(2),
 
513
        self.assertEqual(k.inclusions([2]),
514
514
                         set([0, 2]))
515
515
 
516
516
 
559
559
                          (2, 'line from 2'),
560
560
                          ])
561
561
 
562
 
        self.assertEqual(k.get_included(3),
 
562
        self.assertEqual(k.inclusions([3]),
563
563
                         set([0, 1, 2, 3]))
564
564
 
565
565
        self.log('k._l=' + pformat(k._l))
625
625
        k = Weave()
626
626
        parents = set()
627
627
        for t in texts:
628
 
            ver = k.add(parents, t)
 
628
            ver = k.add(list(parents), t)
629
629
            parents.add(ver)
630
630
 
631
631
        self.log("k._l=" + pformat(k._l))