/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
2294.1.1 by John Arbash Meinel
Track down some non-ascii deficiencies in commit logic.
1
# Copyright (C) 2006, 2007 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,
2294.1.1 by John Arbash Meinel
Track down some non-ascii deficiencies in commit logic.
31
    tests,
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
32
    transform,
33
    )
1852.6.1 by Robert Collins
Start tree implementation tests.
34
from bzrlib.transport import get_transport
35
from bzrlib.tests import (
36
                          adapt_modules,
37
                          default_transport,
38
                          TestCaseWithTransport,
39
                          TestLoader,
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
                          TestSuite,
42
                          )
43
from bzrlib.tests.bzrdir_implementations.test_bzrdir import TestCaseWithBzrDir
2553.2.10 by Robert Collins
And overhaul WorkingTreeTestProviderAdapter too.
44
from bzrlib.tests.workingtree_implementations import (
45
    WorkingTreeTestProviderAdapter,
46
    )
2079.1.1 by John Arbash Meinel
Create a deprecated bzrlib.tree.RevisionTree() in favor of bzrlib.revisiontree.RevisionTree()
47
from bzrlib.revisiontree import RevisionTree
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):
2255.2.64 by John Arbash Meinel
Add the DirStateRevisionTree to the list of 'tree_implementations'
71
    revid = tree.commit('save tree', allow_pointless=True)
72
    return tree.basis_tree()
73
74
1852.6.1 by Robert Collins
Start tree implementation tests.
75
class TestTreeImplementationSupport(TestCaseWithTransport):
76
77
    def test_revision_tree_from_workingtree(self):
78
        tree = self.make_branch_and_tree('.')
3363.1.3 by Aaron Bentley
Hide workingtree_to_test_tree behind a method, to get bound self
79
        tree = revision_tree_from_workingtree(self, tree)
1852.6.1 by Robert Collins
Start tree implementation tests.
80
        self.assertIsInstance(tree, RevisionTree)
81
82
83
class TestCaseWithTree(TestCaseWithBzrDir):
84
1852.8.3 by Robert Collins
Implement an InterTreeTestProvider and a trivial test_compare test case.
85
    def make_branch_and_tree(self, relpath):
86
        made_control = self.make_bzrdir(relpath, format=
87
            self.workingtree_format._matchingbzrdir)
1852.6.1 by Robert Collins
Start tree implementation tests.
88
        made_control.create_repository()
89
        made_control.create_branch()
90
        return self.workingtree_format.initialize(made_control)
91
3363.1.3 by Aaron Bentley
Hide workingtree_to_test_tree behind a method, to get bound self
92
    def workingtree_to_test_tree(self, tree):
93
        return self._workingtree_to_test_tree(self, tree)
94
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
95
    def _convert_tree(self, tree, converter=None):
96
        """helper to convert using the converter or a supplied one."""
97
        # convert that to the final shape
98
        if converter is None:
99
            converter = self.workingtree_to_test_tree
3363.1.3 by Aaron Bentley
Hide workingtree_to_test_tree behind a method, to get bound self
100
        return converter(tree)
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
101
1852.8.3 by Robert Collins
Implement an InterTreeTestProvider and a trivial test_compare test case.
102
    def get_tree_no_parents_no_content(self, empty_tree, converter=None):
103
        """Make a tree with no parents and no contents from empty_tree.
104
        
105
        :param empty_tree: A working tree with no content and no parents to
106
            modify.
107
        """
1731.1.33 by Aaron Bentley
Revert no-special-root changes
108
        empty_tree.set_root_id('empty-root-id')
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
109
        return self._convert_tree(empty_tree, converter)
1852.6.1 by Robert Collins
Start tree implementation tests.
110
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
111
    def _make_abc_tree(self, tree):
112
        """setup an abc content tree."""
113
        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.
114
        self.build_tree(files, line_endings='binary',
1982.1.4 by Alexander Belchenko
tree_implementations tests: build_tree with binary (LF) line-endings
115
                        transport=tree.bzrdir.root_transport)
1731.1.33 by Aaron Bentley
Revert no-special-root changes
116
        tree.set_root_id('root-id')
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
117
        tree.add(files, ['a-id', 'b-id', 'c-id'])
118
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
119
    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.
120
        """return a test tree with a, b/, b/c contents."""
121
        self._make_abc_tree(tree)
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
122
        return self._convert_tree(tree, converter)
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
123
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
124
    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.
125
        """return a test tree with a, b/, b/c contents.
126
        
127
        This variation changes the content of 'a' to foobar\n.
128
        """
129
        self._make_abc_tree(tree)
130
        f = open(tree.basedir + '/a', 'wb')
131
        try:
132
            f.write('foobar\n')
133
        finally:
134
            f.close()
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
135
        return self._convert_tree(tree, converter)
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
136
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
137
    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.
138
        """return a test tree with a, b/, b/c contents.
139
        
140
        This variation changes the executable flag of b/c to True.
141
        """
142
        self._make_abc_tree(tree)
143
        tt = transform.TreeTransform(tree)
144
        trans_id = tt.trans_id_tree_path('b/c')
145
        tt.set_executability(True, trans_id)
146
        tt.apply()
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
147
        return self._convert_tree(tree, converter)
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
148
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
149
    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.
150
        """return a test tree with d, b/, b/c contents.
151
        
152
        This variation renames a to d.
153
        """
154
        self._make_abc_tree(tree)
155
        tree.rename_one('a', 'd')
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
156
        return self._convert_tree(tree, converter)
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
157
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
158
    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.
159
        """return a test tree with d, b/, b/c contents.
160
        
161
        This variation renames a to d and alters its content to 'bar\n'.
162
        """
163
        self._make_abc_tree(tree)
164
        tree.rename_one('a', 'd')
165
        f = open(tree.basedir + '/d', 'wb')
166
        try:
167
            f.write('bar\n')
168
        finally:
169
            f.close()
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
170
        return self._convert_tree(tree, converter)
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
171
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
172
    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.
173
        """return a test tree with a, b/, e contents.
174
        
175
        This variation renames b/c to e, and makes it executable.
176
        """
177
        self._make_abc_tree(tree)
178
        tt = transform.TreeTransform(tree)
179
        trans_id = tt.trans_id_tree_path('b/c')
180
        parent_trans_id = tt.trans_id_tree_path('')
181
        tt.adjust_path('e', parent_trans_id, trans_id)
182
        tt.set_executability(True, trans_id)
183
        tt.apply()
1852.8.7 by Robert Collins
Update tree_implementation test tree factories to be intertree ready.
184
        return self._convert_tree(tree, converter)
1852.6.9 by Robert Collins
Add more test trees to the tree-implementations tests.
185
1852.15.1 by Robert Collins
Add a complex test tree for use with Tree.walkdirs.
186
    def get_tree_with_subdirs_and_all_content_types(self):
187
        """Return a test tree with subdirs and all content types.
2408.1.3 by Alexander Belchenko
tree_implementations: make usage of symlinks optional
188
        See get_tree_with_subdirs_and_all_supported_content_types for details.
189
        """
2408.1.8 by Alexander Belchenko
forget to return tree
190
        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
191
192
    def get_tree_with_subdirs_and_all_supported_content_types(self, symlinks):
193
        """Return a test tree with subdirs and all supported content types.
194
        Some content types may not be created on some platforms
195
        (like symlinks on native win32)
196
197
        :param  symlinks:   control is symlink should be created in the tree.
198
                            Note: if you wish to automatically set this
199
                            parameters depending on underlying system,
200
                            please use value returned
201
                            by bzrlib.osutils.has_symlinks() function.
1852.15.1 by Robert Collins
Add a complex test tree for use with Tree.walkdirs.
202
203
        The returned tree has the following inventory:
204
            [('', inventory.ROOT_ID),
205
             ('0file', '2file'),
206
             ('1top-dir', '1top-dir'),
207
             (u'2utf\u1234file', u'0utf\u1234file'),
2408.1.3 by Alexander Belchenko
tree_implementations: make usage of symlinks optional
208
             ('symlink', 'symlink'),            # only if symlinks arg is True
1852.15.1 by Robert Collins
Add a complex test tree for use with Tree.walkdirs.
209
             ('1top-dir/0file-in-1topdir', '1file-in-1topdir'),
210
             ('1top-dir/1dir-in-1topdir', '0dir-in-1topdir')]
2408.1.3 by Alexander Belchenko
tree_implementations: make usage of symlinks optional
211
        where each component has the type of its name -
212
        i.e. '1file..' is afile.
1852.15.1 by Robert Collins
Add a complex test tree for use with Tree.walkdirs.
213
214
        note that the order of the paths and fileids is deliberately 
215
        mismatched to ensure that the result order is path based.
216
        """
217
        tree = self.make_branch_and_tree('.')
218
        paths = ['0file',
219
            '1top-dir/',
220
            u'2utf\u1234file',
221
            '1top-dir/0file-in-1topdir',
222
            '1top-dir/1dir-in-1topdir/'
223
            ]
224
        ids = [
225
            '2file',
226
            '1top-dir',
2255.2.107 by John Arbash Meinel
(working), fix dirstate to use utf8 file ids.
227
            u'0utf\u1234file'.encode('utf8'),
1852.15.1 by Robert Collins
Add a complex test tree for use with Tree.walkdirs.
228
            '1file-in-1topdir',
229
            '0dir-in-1topdir'
230
            ]
2321.1.2 by Robert Collins
Skip new tests that depend on unicode file paths.
231
        try:
232
            self.build_tree(paths)
233
        except UnicodeError:
234
            raise TestSkipped(
235
                'This platform does not support unicode file paths.')
1852.15.1 by Robert Collins
Add a complex test tree for use with Tree.walkdirs.
236
        tree.add(paths, ids)
237
        tt = transform.TreeTransform(tree)
2408.1.3 by Alexander Belchenko
tree_implementations: make usage of symlinks optional
238
        if symlinks:
239
            root_transaction_id = tt.trans_id_tree_path('')
240
            tt.new_symlink('symlink',
241
                root_transaction_id, 'link-target', 'symlink')
1852.15.1 by Robert Collins
Add a complex test tree for use with Tree.walkdirs.
242
        tt.apply()
243
        return self.workingtree_to_test_tree(tree)
244
2294.1.1 by John Arbash Meinel
Track down some non-ascii deficiencies in commit logic.
245
    def get_tree_with_utf8(self, tree):
246
        """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
247
        self._create_tree_with_utf8(tree)
248
        return self.workingtree_to_test_tree(tree)
249
250
    def _create_tree_with_utf8(self, tree):
251
        """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.
252
        paths = [u'',
253
                 u'f\xf6',
2294.1.1 by John Arbash Meinel
Track down some non-ascii deficiencies in commit logic.
254
                 u'b\xe5r/',
255
                 u'b\xe5r/b\xe1z',
256
                ]
257
        # bzr itself does not create unicode file ids, but we want them for
258
        # testing.
2309.4.10 by John Arbash Meinel
(fixed) Fix the last few tests that were explicitly passing around unicode ids
259
        file_ids = ['TREE_ROOT',
260
                    'f\xc3\xb6-id',
261
                    'b\xc3\xa5r-id',
262
                    'b\xc3\xa1z-id',
2294.1.1 by John Arbash Meinel
Track down some non-ascii deficiencies in commit logic.
263
                   ]
264
        try:
2294.1.3 by John Arbash Meinel
Make sure the inventory enrtries returned are properly formed.
265
            self.build_tree(paths[1:])
2294.1.1 by John Arbash Meinel
Track down some non-ascii deficiencies in commit logic.
266
        except UnicodeError:
267
            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('')
268
        if tree.get_root_id() is None:
2255.2.107 by John Arbash Meinel
(working), fix dirstate to use utf8 file ids.
269
            # Some trees do not have a root yet.
270
            tree.add(paths, file_ids)
271
        else:
272
            # Some trees will already have a root
273
            tree.set_root_id(file_ids[0])
274
            tree.add(paths[1:], file_ids[1:])
2294.1.1 by John Arbash Meinel
Track down some non-ascii deficiencies in commit logic.
275
        try:
276
            tree.commit(u'in\xedtial', rev_id=u'r\xe9v-1'.encode('utf8'))
277
        except errors.NonAsciiRevisionId:
278
            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
279
280
    def get_tree_with_merged_utf8(self, tree):
281
        """Generate a tree with utf8 ancestors."""
282
        self._create_tree_with_utf8(tree)
283
        tree2 = tree.bzrdir.sprout('tree2').open_workingtree()
284
        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.
285
        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
286
        tree2.commit(u'to m\xe9rge', rev_id=u'r\xe9v-2'.encode('utf8'))
287
288
        tree.merge_from_branch(tree2.branch)
289
        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.
290
        return self.workingtree_to_test_tree(tree)
291
1852.6.1 by Robert Collins
Start tree implementation tests.
292
293
class TreeTestProviderAdapter(WorkingTreeTestProviderAdapter):
294
    """Generate test suites for each Tree implementation in bzrlib.
295
2553.2.10 by Robert Collins
And overhaul WorkingTreeTestProviderAdapter too.
296
    Currently this covers all working tree formats, and RevisionTree and
297
    DirStateRevisionTree by committing a working tree to create the revision
298
    tree.
1852.6.1 by Robert Collins
Start tree implementation tests.
299
    """
300
2553.2.10 by Robert Collins
And overhaul WorkingTreeTestProviderAdapter too.
301
    def __init__(self, transport_server, transport_readonly_server, formats):
302
        super(TreeTestProviderAdapter, self).__init__(transport_server,
303
            transport_readonly_server, formats)
304
        # now adjust the scenarios and add the non-working-tree tree scenarios.
305
        for scenario in self.scenarios:
1852.6.1 by Robert Collins
Start tree implementation tests.
306
            # 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
307
            scenario[1]["_workingtree_to_test_tree"] = return_parameter
2553.2.10 by Robert Collins
And overhaul WorkingTreeTestProviderAdapter too.
308
        # add RevisionTree scenario
3363.1.1 by Aaron Bentley
Refactor intertree scenario creation
309
        self.scenarios.append(self.create_tree_scenario(RevisionTree.__name__,
310
                              revision_tree_from_workingtree,))
311
312
        # also test WorkingTree4's RevisionTree implementation which is
313
        # specialised.
314
        self.scenarios.append(self.create_tree_scenario(
315
            DirStateRevisionTree.__name__, _dirstate_tree_from_workingtree,
316
            WorkingTreeFormat4()))
317
318
    def create_tree_scenario(self, name, converter, workingtree_format=None):
3363.1.6 by Aaron Bentley
Add docs
319
        """Create a scenario for the specified converter
320
321
        :param name: The name to append to tests using this converter
322
        :param converter: A function that converts a workingtree into the
323
            desired format.
324
        :param workingtree_format: The particular workingtree format to
325
            convert from.
326
        :return: a (name, options) tuple, where options is a dict of values
327
            to be used as members of the TestCase.
328
        """
3363.1.1 by Aaron Bentley
Refactor intertree scenario creation
329
        if workingtree_format is None:
330
            workingtree_format = WorkingTreeFormat3()
331
        scenario_options = WorkingTreeTestProviderAdapter.create_scenario(self,
332
            workingtree_format, workingtree_format._matchingbzrdir)[1]
3363.1.3 by Aaron Bentley
Hide workingtree_to_test_tree behind a method, to get bound self
333
        scenario_options["_workingtree_to_test_tree"] = converter
3363.1.1 by Aaron Bentley
Refactor intertree scenario creation
334
        return name, scenario_options
1852.6.1 by Robert Collins
Start tree implementation tests.
335
336
337
def test_suite():
338
    result = TestSuite()
339
    test_tree_implementations = [
3224.1.28 by John Arbash Meinel
Add some direct tests for Tree.annotate_iter
340
        'bzrlib.tests.tree_implementations.test_annotate_iter',
2255.7.36 by John Arbash Meinel
All trees should implement get_file_mtime()
341
        'bzrlib.tests.tree_implementations.test_get_file_mtime',
2946.3.2 by John Arbash Meinel
Add tree implementation tests for Tree.get_root_id()
342
        'bzrlib.tests.tree_implementations.test_get_root_id',
2255.2.134 by John Arbash Meinel
Add a tree-test for get_symlink_target
343
        '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.
344
        'bzrlib.tests.tree_implementations.test_inv',
2255.2.71 by John Arbash Meinel
Add a test for list_files, and implement it for DirStateRevisionTree
345
        'bzrlib.tests.tree_implementations.test_list_files',
2776.1.7 by Robert Collins
* New method on ``bzrlib.tree.Tree`` ``path_content_summary`` provides a
346
        'bzrlib.tests.tree_implementations.test_path_content_summary',
1908.11.5 by John Arbash Meinel
[merge] bzr.dev 2240
347
        'bzrlib.tests.tree_implementations.test_revision_tree',
1852.6.1 by Robert Collins
Start tree implementation tests.
348
        'bzrlib.tests.tree_implementations.test_test_trees',
1551.9.16 by Aaron Bentley
Implement Tree.annotate_iter for RevisionTree and WorkingTree
349
        'bzrlib.tests.tree_implementations.test_tree',
1852.15.3 by Robert Collins
Add a first-cut Tree.walkdirs method.
350
        'bzrlib.tests.tree_implementations.test_walkdirs',
1852.6.1 by Robert Collins
Start tree implementation tests.
351
        ]
352
    adapter = TreeTestProviderAdapter(
353
        default_transport,
354
        # None here will cause a readonly decorator to be created
355
        # by the TestCaseWithTransport.get_readonly_transport method.
356
        None,
357
        [(format, format._matchingbzrdir) for format in 
358
         WorkingTreeFormat._formats.values() + _legacy_formats])
359
    loader = TestLoader()
360
    adapt_modules(test_tree_implementations, adapter, loader, result)
361
    result.addTests(loader.loadTestsFromModuleNames(['bzrlib.tests.tree_implementations']))
362
    return result