/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
3363.2.7 by Aaron Bentley
Implement alterntative-to-inventory tests
1
# Copyright (C) 2006, 2007, 2008 Canonical Ltd
1852.6.7 by Robert Collins
Fix up new tree_implementations __init__.py header.
2
#
1852.6.1 by Robert Collins
Start tree implementation tests.
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
1852.6.7 by Robert Collins
Fix up new tree_implementations __init__.py header.
7
#
1852.6.1 by Robert Collins
Start tree implementation tests.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
# GNU General Public License for more details.
1852.6.7 by Robert Collins
Fix up new tree_implementations __init__.py header.
12
#
1852.6.1 by Robert Collins
Start tree implementation tests.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
17
18
"""Tree implementation tests for bzr.
19
20
These test the conformance of all the tree variations to the expected API.
21
Specific tests for individual variations are in other places such as:
22
 - tests/test_tree.py
23
 - tests/test_revision.py
24
 - tests/test_workingtree.py
25
 - tests/workingtree_implementations/*.py.
26
"""
27
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
28
from bzrlib import (
29
    errors,
2309.4.10 by John Arbash Meinel
(fixed) Fix the last few tests that were explicitly passing around unicode ids
30
    osutils,
3363.2.17 by Aaron Bentley
Start implementing post-change PreviewTree functionality
31
    progress,
2294.1.1 by John Arbash Meinel
Track down some non-ascii deficiencies in commit logic.
32
    tests,
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
33
    transform,
34
    )
1852.6.1 by Robert Collins
Start tree implementation tests.
35
from bzrlib.transport import get_transport
36
from bzrlib.tests import (
37
                          adapt_modules,
38
                          default_transport,
39
                          TestCaseWithTransport,
2321.1.2 by Robert Collins
Skip new tests that depend on unicode file paths.
40
                          TestSkipped,
1852.6.1 by Robert Collins
Start tree implementation tests.
41
                          )
42
from bzrlib.tests.bzrdir_implementations.test_bzrdir import TestCaseWithBzrDir
2553.2.10 by Robert Collins
And overhaul WorkingTreeTestProviderAdapter too.
43
from bzrlib.tests.workingtree_implementations import (
44
    WorkingTreeTestProviderAdapter,
45
    )
2079.1.1 by John Arbash Meinel
Create a deprecated bzrlib.tree.RevisionTree() in favor of bzrlib.revisiontree.RevisionTree()
46
from bzrlib.revisiontree import RevisionTree
3363.2.2 by Aaron Bentley
Add PreviewTree pre scenarios
47
from bzrlib.transform import TransformPreview
2255.2.164 by Martin Pool
Change the default format for some tests from AB1 back to WorkingTreeFormat3
48
from bzrlib.workingtree import (
49
    WorkingTreeFormat,
50
    WorkingTreeFormat3,
51
    _legacy_formats,
52
    )
2255.2.64 by John Arbash Meinel
Add the DirStateRevisionTree to the list of 'tree_implementations'
53
from bzrlib.workingtree_4 import (
54
    DirStateRevisionTree,
55
    WorkingTreeFormat4,
56
    )
1852.6.1 by Robert Collins
Start tree implementation tests.
57
58
3363.1.2 by Aaron Bentley
Add TestCase as converter param
59
def return_parameter(testcase, something):
1852.6.1 by Robert Collins
Start tree implementation tests.
60
    """A trivial thunk to return its input."""
61
    return something
62
63
3363.1.2 by Aaron Bentley
Add TestCase as converter param
64
def revision_tree_from_workingtree(testcase, tree):
1852.6.1 by Robert Collins
Start tree implementation tests.
65
    """Create a revision tree from a working tree."""
2100.3.36 by Aaron Bentley
avoid subtree commit when converting a work tree into a revision tree
66
    revid = tree.commit('save tree', allow_pointless=True, recursive=None)
1852.6.1 by Robert Collins
Start tree implementation tests.
67
    return tree.branch.repository.revision_tree(revid)
68
69
3363.1.2 by Aaron Bentley
Add TestCase as converter param
70
def _dirstate_tree_from_workingtree(testcase, tree):
3504.2.1 by John Arbash Meinel
Shortcut iter_references when we know references aren't supported.
71
    revid = tree.commit('save tree', allow_pointless=True, recursive=None)
2255.2.64 by John Arbash Meinel
Add the DirStateRevisionTree to the list of 'tree_implementations'
72
    return tree.basis_tree()
73
74
3363.2.2 by Aaron Bentley
Add PreviewTree pre scenarios
75
def preview_tree_pre(testcase, tree):
76
    tt = TransformPreview(tree)
77
    testcase.addCleanup(tt.finalize)
78
    return tt.get_preview_tree()
79
80
1852.6.1 by Robert Collins
Start tree implementation tests.
81
class TestTreeImplementationSupport(TestCaseWithTransport):
82
83
    def test_revision_tree_from_workingtree(self):
84
        tree = self.make_branch_and_tree('.')
3363.1.3 by Aaron Bentley
Hide workingtree_to_test_tree behind a method, to get bound self
85
        tree = revision_tree_from_workingtree(self, tree)
1852.6.1 by Robert Collins
Start tree implementation tests.
86
        self.assertIsInstance(tree, RevisionTree)
87
88
89
class TestCaseWithTree(TestCaseWithBzrDir):
90
1852.8.3 by Robert Collins
Implement an InterTreeTestProvider and a trivial test_compare test case.
91
    def make_branch_and_tree(self, relpath):
92
        made_control = self.make_bzrdir(relpath, format=
93
            self.workingtree_format._matchingbzrdir)
1852.6.1 by Robert Collins
Start tree implementation tests.
94
        made_control.create_repository()
95
        made_control.create_branch()
96
        return self.workingtree_format.initialize(made_control)
97
3363.1.3 by Aaron Bentley
Hide workingtree_to_test_tree behind a method, to get bound self
98
    def workingtree_to_test_tree(self, tree):
99
        return self._workingtree_to_test_tree(self, tree)
100
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
101
    def _convert_tree(self, tree, converter=None):
102
        """helper to convert using the converter or a supplied one."""
103
        # convert that to the final shape
104
        if converter is None:
105
            converter = self.workingtree_to_test_tree
3363.1.3 by Aaron Bentley
Hide workingtree_to_test_tree behind a method, to get bound self
106
        return converter(tree)
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
107
1852.8.3 by Robert Collins
Implement an InterTreeTestProvider and a trivial test_compare test case.
108
    def get_tree_no_parents_no_content(self, empty_tree, converter=None):
109
        """Make a tree with no parents and no contents from empty_tree.
110
        
111
        :param empty_tree: A working tree with no content and no parents to
112
            modify.
113
        """
1731.1.33 by Aaron Bentley
Revert no-special-root changes
114
        empty_tree.set_root_id('empty-root-id')
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
115
        return self._convert_tree(empty_tree, converter)
1852.6.1 by Robert Collins
Start tree implementation tests.
116
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
117
    def _make_abc_tree(self, tree):
118
        """setup an abc content tree."""
119
        files = ['a', 'b/', 'b/c']
2255.2.15 by Robert Collins
Dirstate - truncate state file fixing bug in saving a smaller file, get more tree_implementation tests passing.
120
        self.build_tree(files, line_endings='binary',
1982.1.4 by Alexander Belchenko
tree_implementations tests: build_tree with binary (LF) line-endings
121
                        transport=tree.bzrdir.root_transport)
1731.1.33 by Aaron Bentley
Revert no-special-root changes
122
        tree.set_root_id('root-id')
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
123
        tree.add(files, ['a-id', 'b-id', 'c-id'])
124
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
125
    def get_tree_no_parents_abc_content(self, tree, converter=None):
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
126
        """return a test tree with a, b/, b/c contents."""
127
        self._make_abc_tree(tree)
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
128
        return self._convert_tree(tree, converter)
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
129
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
130
    def get_tree_no_parents_abc_content_2(self, tree, converter=None):
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
131
        """return a test tree with a, b/, b/c contents.
132
        
133
        This variation changes the content of 'a' to foobar\n.
134
        """
135
        self._make_abc_tree(tree)
136
        f = open(tree.basedir + '/a', 'wb')
137
        try:
138
            f.write('foobar\n')
139
        finally:
140
            f.close()
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
141
        return self._convert_tree(tree, converter)
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
142
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
143
    def get_tree_no_parents_abc_content_3(self, tree, converter=None):
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
144
        """return a test tree with a, b/, b/c contents.
145
        
146
        This variation changes the executable flag of b/c to True.
147
        """
148
        self._make_abc_tree(tree)
149
        tt = transform.TreeTransform(tree)
150
        trans_id = tt.trans_id_tree_path('b/c')
151
        tt.set_executability(True, trans_id)
152
        tt.apply()
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
153
        return self._convert_tree(tree, converter)
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
154
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
155
    def get_tree_no_parents_abc_content_4(self, tree, converter=None):
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
156
        """return a test tree with d, b/, b/c contents.
157
        
158
        This variation renames a to d.
159
        """
160
        self._make_abc_tree(tree)
161
        tree.rename_one('a', 'd')
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
162
        return self._convert_tree(tree, converter)
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
163
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
164
    def get_tree_no_parents_abc_content_5(self, tree, converter=None):
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
165
        """return a test tree with d, b/, b/c contents.
166
        
167
        This variation renames a to d and alters its content to 'bar\n'.
168
        """
169
        self._make_abc_tree(tree)
170
        tree.rename_one('a', 'd')
171
        f = open(tree.basedir + '/d', 'wb')
172
        try:
173
            f.write('bar\n')
174
        finally:
175
            f.close()
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
176
        return self._convert_tree(tree, converter)
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
177
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
178
    def get_tree_no_parents_abc_content_6(self, tree, converter=None):
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
179
        """return a test tree with a, b/, e contents.
180
        
181
        This variation renames b/c to e, and makes it executable.
182
        """
183
        self._make_abc_tree(tree)
184
        tt = transform.TreeTransform(tree)
185
        trans_id = tt.trans_id_tree_path('b/c')
186
        parent_trans_id = tt.trans_id_tree_path('')
187
        tt.adjust_path('e', parent_trans_id, trans_id)
188
        tt.set_executability(True, trans_id)
189
        tt.apply()
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
190
        return self._convert_tree(tree, converter)
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
191
1852.15.1 by Robert Collins
Add a complex test tree for use with Tree.walkdirs.
192
    def get_tree_with_subdirs_and_all_content_types(self):
193
        """Return a test tree with subdirs and all content types.
2408.1.3 by Alexander Belchenko
tree_implementations: make usage of symlinks optional
194
        See get_tree_with_subdirs_and_all_supported_content_types for details.
195
        """
2408.1.8 by Alexander Belchenko
forget to return tree
196
        return self.get_tree_with_subdirs_and_all_supported_content_types(True)
2408.1.3 by Alexander Belchenko
tree_implementations: make usage of symlinks optional
197
198
    def get_tree_with_subdirs_and_all_supported_content_types(self, symlinks):
199
        """Return a test tree with subdirs and all supported content types.
200
        Some content types may not be created on some platforms
201
        (like symlinks on native win32)
202
203
        :param  symlinks:   control is symlink should be created in the tree.
204
                            Note: if you wish to automatically set this
205
                            parameters depending on underlying system,
206
                            please use value returned
207
                            by bzrlib.osutils.has_symlinks() function.
1852.15.1 by Robert Collins
Add a complex test tree for use with Tree.walkdirs.
208
209
        The returned tree has the following inventory:
210
            [('', inventory.ROOT_ID),
211
             ('0file', '2file'),
212
             ('1top-dir', '1top-dir'),
213
             (u'2utf\u1234file', u'0utf\u1234file'),
2408.1.3 by Alexander Belchenko
tree_implementations: make usage of symlinks optional
214
             ('symlink', 'symlink'),            # only if symlinks arg is True
1852.15.1 by Robert Collins
Add a complex test tree for use with Tree.walkdirs.
215
             ('1top-dir/0file-in-1topdir', '1file-in-1topdir'),
216
             ('1top-dir/1dir-in-1topdir', '0dir-in-1topdir')]
2408.1.3 by Alexander Belchenko
tree_implementations: make usage of symlinks optional
217
        where each component has the type of its name -
218
        i.e. '1file..' is afile.
1852.15.1 by Robert Collins
Add a complex test tree for use with Tree.walkdirs.
219
220
        note that the order of the paths and fileids is deliberately 
221
        mismatched to ensure that the result order is path based.
222
        """
223
        tree = self.make_branch_and_tree('.')
224
        paths = ['0file',
225
            '1top-dir/',
226
            u'2utf\u1234file',
227
            '1top-dir/0file-in-1topdir',
228
            '1top-dir/1dir-in-1topdir/'
229
            ]
230
        ids = [
231
            '2file',
232
            '1top-dir',
2255.2.107 by John Arbash Meinel
(working), fix dirstate to use utf8 file ids.
233
            u'0utf\u1234file'.encode('utf8'),
1852.15.1 by Robert Collins
Add a complex test tree for use with Tree.walkdirs.
234
            '1file-in-1topdir',
235
            '0dir-in-1topdir'
236
            ]
2321.1.2 by Robert Collins
Skip new tests that depend on unicode file paths.
237
        try:
238
            self.build_tree(paths)
239
        except UnicodeError:
240
            raise TestSkipped(
241
                'This platform does not support unicode file paths.')
1852.15.1 by Robert Collins
Add a complex test tree for use with Tree.walkdirs.
242
        tree.add(paths, ids)
243
        tt = transform.TreeTransform(tree)
2408.1.3 by Alexander Belchenko
tree_implementations: make usage of symlinks optional
244
        if symlinks:
245
            root_transaction_id = tt.trans_id_tree_path('')
246
            tt.new_symlink('symlink',
247
                root_transaction_id, 'link-target', 'symlink')
1852.15.1 by Robert Collins
Add a complex test tree for use with Tree.walkdirs.
248
        tt.apply()
249
        return self.workingtree_to_test_tree(tree)
250
2294.1.1 by John Arbash Meinel
Track down some non-ascii deficiencies in commit logic.
251
    def get_tree_with_utf8(self, tree):
252
        """Generate a tree with a utf8 revision and unicode paths."""
2294.1.2 by John Arbash Meinel
Track down and add tests that all tree.commit() can handle
253
        self._create_tree_with_utf8(tree)
254
        return self.workingtree_to_test_tree(tree)
255
256
    def _create_tree_with_utf8(self, tree):
257
        """Generate a tree with a utf8 revision and unicode paths."""
2294.1.3 by John Arbash Meinel
Make sure the inventory enrtries returned are properly formed.
258
        paths = [u'',
259
                 u'f\xf6',
2294.1.1 by John Arbash Meinel
Track down some non-ascii deficiencies in commit logic.
260
                 u'b\xe5r/',
261
                 u'b\xe5r/b\xe1z',
262
                ]
263
        # bzr itself does not create unicode file ids, but we want them for
264
        # testing.
2309.4.10 by John Arbash Meinel
(fixed) Fix the last few tests that were explicitly passing around unicode ids
265
        file_ids = ['TREE_ROOT',
266
                    'f\xc3\xb6-id',
267
                    'b\xc3\xa5r-id',
268
                    'b\xc3\xa1z-id',
2294.1.1 by John Arbash Meinel
Track down some non-ascii deficiencies in commit logic.
269
                   ]
270
        try:
2294.1.3 by John Arbash Meinel
Make sure the inventory enrtries returned are properly formed.
271
            self.build_tree(paths[1:])
2294.1.1 by John Arbash Meinel
Track down some non-ascii deficiencies in commit logic.
272
        except UnicodeError:
273
            raise tests.TestSkipped('filesystem does not support unicode.')
2946.3.3 by John Arbash Meinel
Prefer tree.get_root_id() as more explicit than tree.path2id('')
274
        if tree.get_root_id() is None:
2255.2.107 by John Arbash Meinel
(working), fix dirstate to use utf8 file ids.
275
            # Some trees do not have a root yet.
276
            tree.add(paths, file_ids)
277
        else:
278
            # Some trees will already have a root
279
            tree.set_root_id(file_ids[0])
280
            tree.add(paths[1:], file_ids[1:])
2294.1.1 by John Arbash Meinel
Track down some non-ascii deficiencies in commit logic.
281
        try:
282
            tree.commit(u'in\xedtial', rev_id=u'r\xe9v-1'.encode('utf8'))
283
        except errors.NonAsciiRevisionId:
284
            raise tests.TestSkipped('non-ascii revision ids not supported')
2294.1.2 by John Arbash Meinel
Track down and add tests that all tree.commit() can handle
285
286
    def get_tree_with_merged_utf8(self, tree):
287
        """Generate a tree with utf8 ancestors."""
288
        self._create_tree_with_utf8(tree)
289
        tree2 = tree.bzrdir.sprout('tree2').open_workingtree()
290
        self.build_tree([u'tree2/b\xe5r/z\xf7z'])
2858.2.1 by Martin Pool
Remove most calls to safe_file_id and safe_revision_id.
291
        tree2.add([u'b\xe5r/z\xf7z'], [u'z\xf7z-id'.encode('utf-8')])
2294.1.2 by John Arbash Meinel
Track down and add tests that all tree.commit() can handle
292
        tree2.commit(u'to m\xe9rge', rev_id=u'r\xe9v-2'.encode('utf8'))
293
294
        tree.merge_from_branch(tree2.branch)
295
        tree.commit(u'm\xe9rge', rev_id=u'r\xe9v-3'.encode('utf8'))
2294.1.1 by John Arbash Meinel
Track down some non-ascii deficiencies in commit logic.
296
        return self.workingtree_to_test_tree(tree)
297
1852.6.1 by Robert Collins
Start tree implementation tests.
298
299
class TreeTestProviderAdapter(WorkingTreeTestProviderAdapter):
300
    """Generate test suites for each Tree implementation in bzrlib.
301
2553.2.10 by Robert Collins
And overhaul WorkingTreeTestProviderAdapter too.
302
    Currently this covers all working tree formats, and RevisionTree and
303
    DirStateRevisionTree by committing a working tree to create the revision
304
    tree.
1852.6.1 by Robert Collins
Start tree implementation tests.
305
    """
306
2553.2.10 by Robert Collins
And overhaul WorkingTreeTestProviderAdapter too.
307
    def __init__(self, transport_server, transport_readonly_server, formats):
308
        super(TreeTestProviderAdapter, self).__init__(transport_server,
309
            transport_readonly_server, formats)
310
        # now adjust the scenarios and add the non-working-tree tree scenarios.
311
        for scenario in self.scenarios:
1852.6.1 by Robert Collins
Start tree implementation tests.
312
            # for working tree adapted tests, preserve the tree
3363.1.3 by Aaron Bentley
Hide workingtree_to_test_tree behind a method, to get bound self
313
            scenario[1]["_workingtree_to_test_tree"] = return_parameter
2553.2.10 by Robert Collins
And overhaul WorkingTreeTestProviderAdapter too.
314
        # add RevisionTree scenario
3363.1.1 by Aaron Bentley
Refactor intertree scenario creation
315
        self.scenarios.append(self.create_tree_scenario(RevisionTree.__name__,
316
                              revision_tree_from_workingtree,))
317
318
        # also test WorkingTree4's RevisionTree implementation which is
319
        # specialised.
320
        self.scenarios.append(self.create_tree_scenario(
321
            DirStateRevisionTree.__name__, _dirstate_tree_from_workingtree,
322
            WorkingTreeFormat4()))
3363.2.2 by Aaron Bentley
Add PreviewTree pre scenarios
323
        self.scenarios.append(self.create_tree_scenario('PreviewTree',
324
            preview_tree_pre))
3363.1.1 by Aaron Bentley
Refactor intertree scenario creation
325
326
    def create_tree_scenario(self, name, converter, workingtree_format=None):
3363.1.6 by Aaron Bentley
Add docs
327
        """Create a scenario for the specified converter
328
329
        :param name: The name to append to tests using this converter
330
        :param converter: A function that converts a workingtree into the
331
            desired format.
332
        :param workingtree_format: The particular workingtree format to
333
            convert from.
334
        :return: a (name, options) tuple, where options is a dict of values
335
            to be used as members of the TestCase.
336
        """
3363.1.1 by Aaron Bentley
Refactor intertree scenario creation
337
        if workingtree_format is None:
3504.2.1 by John Arbash Meinel
Shortcut iter_references when we know references aren't supported.
338
            workingtree_format = WorkingTreeFormat._default_format
3363.1.1 by Aaron Bentley
Refactor intertree scenario creation
339
        scenario_options = WorkingTreeTestProviderAdapter.create_scenario(self,
340
            workingtree_format, workingtree_format._matchingbzrdir)[1]
3363.1.3 by Aaron Bentley
Hide workingtree_to_test_tree behind a method, to get bound self
341
        scenario_options["_workingtree_to_test_tree"] = converter
3363.1.1 by Aaron Bentley
Refactor intertree scenario creation
342
        return name, scenario_options
1852.6.1 by Robert Collins
Start tree implementation tests.
343
344
3302.9.15 by Vincent Ladeuil
bzrlib.tests.tree_implementations switched from test_suite() to
345
def load_tests(basic_tests, module, loader):
346
    result = loader.suiteClass()
347
    # add the tests for this module
348
    result.addTests(basic_tests)
349
1852.6.1 by Robert Collins
Start tree implementation tests.
350
    test_tree_implementations = [
3224.1.28 by John Arbash Meinel
Add some direct tests for Tree.annotate_iter
351
        'bzrlib.tests.tree_implementations.test_annotate_iter',
2255.7.36 by John Arbash Meinel
All trees should implement get_file_mtime()
352
        'bzrlib.tests.tree_implementations.test_get_file_mtime',
2946.3.2 by John Arbash Meinel
Add tree implementation tests for Tree.get_root_id()
353
        'bzrlib.tests.tree_implementations.test_get_root_id',
2255.2.134 by John Arbash Meinel
Add a tree-test for get_symlink_target
354
        'bzrlib.tests.tree_implementations.test_get_symlink_target',
2338.4.6 by Marien Zwart
Move some tests that do not need a working tree from workingtree_implementations to tree_implementations.
355
        'bzrlib.tests.tree_implementations.test_inv',
2255.2.71 by John Arbash Meinel
Add a test for list_files, and implement it for DirStateRevisionTree
356
        'bzrlib.tests.tree_implementations.test_list_files',
2776.1.7 by Robert Collins
* New method on ``bzrlib.tree.Tree`` ``path_content_summary`` provides a
357
        'bzrlib.tests.tree_implementations.test_path_content_summary',
1908.11.5 by John Arbash Meinel
[merge] bzr.dev 2240
358
        'bzrlib.tests.tree_implementations.test_revision_tree',
1852.6.1 by Robert Collins
Start tree implementation tests.
359
        'bzrlib.tests.tree_implementations.test_test_trees',
1551.9.16 by Aaron Bentley
Implement Tree.annotate_iter for RevisionTree and WorkingTree
360
        'bzrlib.tests.tree_implementations.test_tree',
1852.15.3 by Robert Collins
Add a first-cut Tree.walkdirs method.
361
        'bzrlib.tests.tree_implementations.test_walkdirs',
1852.6.1 by Robert Collins
Start tree implementation tests.
362
        ]
3302.9.15 by Vincent Ladeuil
bzrlib.tests.tree_implementations switched from test_suite() to
363
1852.6.1 by Robert Collins
Start tree implementation tests.
364
    adapter = TreeTestProviderAdapter(
365
        default_transport,
366
        # None here will cause a readonly decorator to be created
367
        # by the TestCaseWithTransport.get_readonly_transport method.
368
        None,
3302.9.15 by Vincent Ladeuil
bzrlib.tests.tree_implementations switched from test_suite() to
369
        [(format, format._matchingbzrdir) for format in
1852.6.1 by Robert Collins
Start tree implementation tests.
370
         WorkingTreeFormat._formats.values() + _legacy_formats])
3302.9.15 by Vincent Ladeuil
bzrlib.tests.tree_implementations switched from test_suite() to
371
3302.9.27 by Vincent Ladeuil
Fixed as per Ian's review.
372
    # add the tests for the sub modules
1852.6.1 by Robert Collins
Start tree implementation tests.
373
    adapt_modules(test_tree_implementations, adapter, loader, result)
374
    return result