~jameinel/bzr/fix-push2

« back to all changes in this revision

Viewing changes to bzrlib/tests/tree_implementations/test_tree.py

  • Committer: Aaron Bentley
  • Date: 2006-12-15 18:16:34 UTC
  • mto: This revision was merged to the branch mainline in revision 2193.
  • Revision ID: abentley@panoramicfeedback.com-20061215181634-pvdzlrgya7rszujv
Implement Tree.annotate_iter for RevisionTree and WorkingTree

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from bzrlib.tests.tree_implementations import TestCaseWithTree
 
2
 
 
3
class TestAnnotate(TestCaseWithTree):
 
4
    
 
5
    def test_annotate(self):
 
6
        work_tree = self.make_branch_and_tree('wt')
 
7
        tree = self.get_tree_no_parents_abc_content(work_tree)
 
8
        tree_revision = getattr(tree, 'get_revision_id', lambda: 'current:')()
 
9
        for revision, line in tree.annotate_iter('a-id'):
 
10
            self.assertEqual('contents of a\n', line)
 
11
            self.assertEqual(tree_revision, revision)