~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-07-02 19:02:34 UTC
  • mto: (3363.6.3 path_content_summary)
  • mto: This revision was merged to the branch mainline in revision 3517.
  • Revision ID: aaron@aaronbentley.com-20080702190234-uvxeb5lpf5lvsgk8
Fix iteration order of iter_entries_by_dir

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
        work_tree = self.make_branch_and_tree('wt')
192
192
        tree = self._convert_tree(work_tree)
193
193
        self.assertIsInstance(tree.conflicts(), conflicts.ConflictList)
 
194
 
 
195
 
 
196
class TestIterEntriesByDir(TestCaseWithTree):
 
197
 
 
198
    def test_iteration_order(self):
 
199
        work_tree = self.make_branch_and_tree('.')
 
200
        self.build_tree(['a/', 'a/b/', 'a/b/c', 'a/d/', 'a/d/e', 'f/', 'f/g'])
 
201
        work_tree.add(['a', 'a/b', 'a/b/c', 'a/d', 'a/d/e', 'f', 'f/g'])
 
202
        tree = self._convert_tree(work_tree)
 
203
        output_order = [p for p, e in tree.iter_entries_by_dir()]
 
204
        self.assertEqual(['', 'a', 'f', 'a/b', 'a/d', 'a/b/c', 'a/d/e', 'f/g'],
 
205
                         output_order)