~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

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)