165
165
return self._convert_tree(tree, converter)
167
def get_tree_with_subdirs_and_all_content_types(self):
168
"""Return a test tree with subdirs and all content types.
170
The returned tree has the following inventory:
171
[('', inventory.ROOT_ID),
173
('1top-dir', '1top-dir'),
174
(u'2utf\u1234file', u'0utf\u1234file'),
175
('symlink', 'symlink'),
176
('1top-dir/0file-in-1topdir', '1file-in-1topdir'),
177
('1top-dir/1dir-in-1topdir', '0dir-in-1topdir')]
178
where each component has the type of its name - i.e. '1file..' is afile.
180
note that the order of the paths and fileids is deliberately
181
mismatched to ensure that the result order is path based.
183
tree = self.make_branch_and_tree('.')
187
'1top-dir/0file-in-1topdir',
188
'1top-dir/1dir-in-1topdir/'
197
self.build_tree(paths)
199
tt = transform.TreeTransform(tree)
200
root_transaction_id = tt.trans_id_tree_path('')
201
tt.new_symlink('symlink',
202
root_transaction_id, 'link-target', 'symlink')
204
return self.workingtree_to_test_tree(tree)
168
207
class TreeTestProviderAdapter(WorkingTreeTestProviderAdapter):
169
208
"""Generate test suites for each Tree implementation in bzrlib.
191
230
def test_suite():
192
231
result = TestSuite()
193
232
test_tree_implementations = [
233
'bzrlib.tests.tree_implementations.test_revision_tree',
194
234
'bzrlib.tests.tree_implementations.test_test_trees',
195
235
'bzrlib.tests.tree_implementations.test_tree',
236
'bzrlib.tests.tree_implementations.test_walkdirs',
197
238
adapter = TreeTestProviderAdapter(
198
239
default_transport,