~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2008-03-12 20:13:07 UTC
  • mfrom: (3267 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3756.
  • Revision ID: andrew.bennetts@canonical.com-20080312201307-ngd5bynt2nvhnlb7
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
        finally:
122
122
            tree.unlock()
123
123
 
 
124
    def test_all_file_ids(self):
 
125
        work_tree = self.make_branch_and_tree('wt')
 
126
        tree = self.get_tree_no_parents_abc_content(work_tree)
 
127
        tree.lock_read()
 
128
        self.addCleanup(tree.unlock)
 
129
        self.assertEqual(tree.all_file_ids(),
 
130
                         set(['b-id', 'root-id', 'c-id', 'a-id']))
 
131
 
 
132
 
 
133
class TestStoredKind(TestCaseWithTree):
 
134
 
 
135
    def test_stored_kind(self):
 
136
        tree = self.make_branch_and_tree('tree')
 
137
        work_tree = self.make_branch_and_tree('wt')
 
138
        tree = self.get_tree_no_parents_abc_content(work_tree)
 
139
        tree.lock_read()
 
140
        self.addCleanup(tree.unlock)
 
141
        self.assertEqual('file', tree.stored_kind('a-id'))
 
142
        self.assertEqual('directory', tree.stored_kind('b-id'))
 
143
 
124
144
 
125
145
class TestFileContent(TestCaseWithTree):
126
146