/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 breezy/tests/per_tree/test_test_trees.py

  • Committer: Jelmer Vernooij
  • Date: 2018-02-04 00:06:29 UTC
  • mfrom: (6851.1.1 more-foreign)
  • Revision ID: jelmer@jelmer.uk-20180204000629-9h8r8kf2s2cw7wb9
Merge lp:~jelmer/brz/more-foreign-3

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
        # __iter__ has no strongly defined order
164
164
        tree_root = tree.path2id('')
165
165
        self.assertEqual(
166
 
            {tree_root,
167
 
                '2file',
168
 
                '1top-dir',
169
 
                '1file-in-1topdir',
170
 
                '0dir-in-1topdir',
171
 
                 u'0utf\u1234file'.encode('utf8'),
172
 
                'symlink',
173
 
                 },
 
166
            {tree.path2id(p) for p in [
 
167
                '', '0file', '1top-dir', '1top-dir/1dir-in-1topdir',
 
168
                '1top-dir/0file-in-1topdir', 'symlink', u'2utf\u1234file']},
174
169
            set(tree.all_file_ids()))
175
170
        # note that the order of the paths and fileids is deliberately
176
171
        # mismatched to ensure that the result order is path based.
177
172
        self.assertEqual(
178
 
            [('', tree_root, 'directory'),
179
 
             ('0file', '2file', 'file'),
180
 
             ('1top-dir', '1top-dir', 'directory'),
181
 
             (u'2utf\u1234file', u'0utf\u1234file'.encode('utf8'), 'file'),
182
 
             ('symlink', 'symlink', 'symlink'),
183
 
             ('1top-dir/0file-in-1topdir', '1file-in-1topdir', 'file'),
184
 
             ('1top-dir/1dir-in-1topdir', '0dir-in-1topdir', 'directory')],
185
 
            [(path, node.file_id, node.kind) for path, node in tree.iter_entries_by_dir()])
 
173
            [('', 'directory'),
 
174
             ('0file', 'file'),
 
175
             ('1top-dir', 'directory'),
 
176
             (u'2utf\u1234file', 'file'),
 
177
             ('symlink', 'symlink'),
 
178
             ('1top-dir/0file-in-1topdir', 'file'),
 
179
             ('1top-dir/1dir-in-1topdir', 'directory')],
 
180
            [(path, node.kind) for path, node in tree.iter_entries_by_dir()])
186
181
 
187
182
    def test_tree_with_subdirs_and_all_content_types_wo_symlinks(self):
188
183
        # currently this test tree requires unicode. It might be good
197
192
        # __iter__ has no strongly defined order
198
193
        tree_root = tree.path2id('')
199
194
        self.assertEqual(
200
 
            {tree_root,
201
 
                '2file',
202
 
                '1top-dir',
203
 
                '1file-in-1topdir',
204
 
                '0dir-in-1topdir',
205
 
                 u'0utf\u1234file'.encode('utf8'),
206
 
                 },
207
 
            set(tree.all_file_ids()))
 
195
            {'', '0file', '1top-dir', '1top-dir/0file-in-1topdir',
 
196
             '1top-dir/1dir-in-1topdir', u'2utf\u1234file'},
 
197
            set(tree.all_versioned_paths()))
208
198
        # note that the order of the paths and fileids is deliberately
209
199
        # mismatched to ensure that the result order is path based.
210
200
        self.assertEqual(
211
 
            [('', tree_root, 'directory'),
212
 
             ('0file', '2file', 'file'),
213
 
             ('1top-dir', '1top-dir', 'directory'),
214
 
             (u'2utf\u1234file', u'0utf\u1234file'.encode('utf8'), 'file'),
215
 
             ('1top-dir/0file-in-1topdir', '1file-in-1topdir', 'file'),
216
 
             ('1top-dir/1dir-in-1topdir', '0dir-in-1topdir', 'directory')],
217
 
            [(path, node.file_id, node.kind) for path, node in tree.iter_entries_by_dir()])
 
201
            [('', 'directory'),
 
202
             ('0file', 'file'),
 
203
             ('1top-dir', 'directory'),
 
204
             (u'2utf\u1234file', 'file'),
 
205
             ('1top-dir/0file-in-1topdir', 'file'),
 
206
             ('1top-dir/1dir-in-1topdir', 'directory')],
 
207
            [(path, node.kind) for path, node in tree.iter_entries_by_dir()])
218
208
 
219
209
    def test_tree_with_utf8(self):
220
210
        tree = self.make_branch_and_tree('.')