/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/tree_implementations/test_test_trees.py

Update a clean branch with the dirstate improvements.

Show diffs side-by-side

added added

removed removed

Lines of Context:
127
127
            [(path, node.file_id) for path, node in tree.iter_entries_by_dir()])
128
128
        self.assertEqualDiff('contents of a\n', tree.get_file_text('a-id'))
129
129
        self.assertTrue(tree.is_executable('c-id'))
 
130
 
 
131
    def test_tree_with_subdirs_and_all_content_types(self):
 
132
        # currently this test tree requires unicode. It might be good
 
133
        # to have it simply stop having the single unicode file in it
 
134
        # when dealing with a non-unicode filesystem.
 
135
        tree = self.get_tree_with_subdirs_and_all_content_types()
 
136
        self.assertEqual([], tree.get_parent_ids())
 
137
        self.assertEqual([], tree.conflicts())
 
138
        self.assertEqual([], list(tree.unknowns()))
 
139
        # __iter__ has no strongly defined order
 
140
        self.assertEqual(
 
141
            set([inventory.ROOT_ID,
 
142
                '2file',
 
143
                '1top-dir',
 
144
                '1file-in-1topdir',
 
145
                '0dir-in-1topdir',
 
146
                 u'0utf\u1234file',
 
147
                'symlink',
 
148
                 ]),
 
149
            set(iter(tree)))
 
150
        # note that the order of the paths and fileids is deliberately 
 
151
        # mismatched to ensure that the result order is path based.
 
152
        self.assertEqual(
 
153
            [('', inventory.ROOT_ID, 'directory'),
 
154
             ('0file', '2file', 'file'),
 
155
             ('1top-dir', '1top-dir', 'directory'),
 
156
             (u'2utf\u1234file', u'0utf\u1234file', 'file'),
 
157
             ('symlink', 'symlink', 'symlink'),
 
158
             ('1top-dir/0file-in-1topdir', '1file-in-1topdir', 'file'),
 
159
             ('1top-dir/1dir-in-1topdir', '0dir-in-1topdir', 'directory')],
 
160
            [(path, node.file_id, node.kind) for path, node in tree.iter_entries_by_dir()])