~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-09-20 17:41:09 UTC
  • mfrom: (3363.12.9 paths2ids)
  • Revision ID: pqm@pqm.ubuntu.com-20080920174109-rrml3htu12o56j1h
Support path2ids better for PreviewTree

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
        output_order = [p for p, e in tree.iter_entries_by_dir()]
204
204
        self.assertEqual(['', 'a', 'f', 'a/b', 'a/d', 'a/b/c', 'a/d/e', 'f/g'],
205
205
                         output_order)
 
206
 
 
207
 
 
208
class TestHasId(TestCaseWithTree):
 
209
 
 
210
    def test_has_id(self):
 
211
        work_tree = self.make_branch_and_tree('tree')
 
212
        self.build_tree(['tree/file'])
 
213
        work_tree.add('file', 'file-id')
 
214
        tree = self._convert_tree(work_tree)
 
215
        tree.lock_read()
 
216
        self.addCleanup(tree.unlock)
 
217
        self.assertTrue(tree.has_id('file-id'))
 
218
        self.assertFalse(tree.has_id('dir-id'))