/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Aaron Bentley
  • Date: 2008-06-25 21:33:39 UTC
  • mto: (3363.10.9 preview-post)
  • mto: This revision was merged to the branch mainline in revision 3663.
  • Revision ID: aaron@aaronbentley.com-20080625213339-13p5bl8w0465joz6
Fix listing files

Show diffs side-by-side

added added

removed removed

Lines of Context:
2224
2224
        summary = preview.get_preview_tree().path_content_summary('path')
2225
2225
        self.assertEqual(4, len(summary))
2226
2226
        self.assertEqual('tree-reference', summary[0])
2227
 
 
2228
 
    def test_list_files_with_root(self):
2229
 
        work_tree = self.make_branch_and_tree('wt')
2230
 
        tree = self.get_tree_no_parents_abc_content(work_tree)
2231
 
        expected = [('', 'V', 'directory', 'root-id'),
2232
 
                    ('a', 'V', 'file', 'a-id'),
2233
 
                    ('b', 'V', 'directory', 'b-id'),
2234
 
                    ('b/c', 'V', 'file', 'c-id'),
2235
 
                   ]
2236
 
        tree.lock_read()
2237
 
        try:
2238
 
            actual = [(path, status, kind, file_id)
2239
 
                      for path, status, kind, file_id, ie in
2240
 
                          tree.list_files(include_root=True)]
2241
 
        finally:
2242
 
            tree.unlock()
2243
 
        self.assertEqual(expected, actual)