~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2008-10-12 15:38:00 UTC
  • mto: This revision was merged to the branch mainline in revision 3803.
  • Revision ID: aaron@aaronbentley.com-20081012153800-8ff72bdslnbknfdi
Test Tree.get_file_lines, provide a default implementation

Show diffs side-by-side

added added

removed removed

Lines of Context:
173
173
        # test read by path
174
174
        self.assertEqual('foobar\n', tree.get_file_text('a-id', path='a'))
175
175
 
 
176
    def test_get_file_lines(self):
 
177
        work_tree = self.make_branch_and_tree('wt')
 
178
        tree = self.get_tree_no_parents_abc_content_2(work_tree)
 
179
        tree.lock_read()
 
180
        self.addCleanup(tree.unlock)
 
181
        # test read by file-id
 
182
        self.assertEqual(['foobar\n'], tree.get_file_lines('a-id'))
 
183
        # test read by path
 
184
        self.assertEqual(['foobar\n'], tree.get_file_lines('a-id', path='a'))
176
185
 
177
186
class TestExtractFilesBytes(TestCaseWithTree):
178
187