/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/__init__.py

Merge with lower thread

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
 
84
84
    def test_revision_tree_from_workingtree(self):
85
85
        tree = self.make_branch_and_tree('.')
86
 
        tree = revision_tree_from_workingtree(tree)
 
86
        tree = revision_tree_from_workingtree(self, tree)
87
87
        self.assertIsInstance(tree, RevisionTree)
88
88
 
89
89
 
96
96
        made_control.create_branch()
97
97
        return self.workingtree_format.initialize(made_control)
98
98
 
 
99
    def workingtree_to_test_tree(self, tree):
 
100
        return self._workingtree_to_test_tree(self, tree)
 
101
 
99
102
    def _convert_tree(self, tree, converter=None):
100
103
        """helper to convert using the converter or a supplied one."""
101
104
        # convert that to the final shape
102
105
        if converter is None:
103
106
            converter = self.workingtree_to_test_tree
104
 
        return converter(self, tree)
 
107
        return converter(tree)
105
108
 
106
109
    def get_tree_no_parents_no_content(self, empty_tree, converter=None):
107
110
        """Make a tree with no parents and no contents from empty_tree.
308
311
        # now adjust the scenarios and add the non-working-tree tree scenarios.
309
312
        for scenario in self.scenarios:
310
313
            # for working tree adapted tests, preserve the tree
311
 
            scenario[1]["workingtree_to_test_tree"] = return_parameter
 
314
            scenario[1]["_workingtree_to_test_tree"] = return_parameter
312
315
        # add RevisionTree scenario
313
316
        self.scenarios.append(self.create_tree_scenario(RevisionTree.__name__,
314
317
                              revision_tree_from_workingtree,))
326
329
            workingtree_format = WorkingTreeFormat3()
327
330
        scenario_options = WorkingTreeTestProviderAdapter.create_scenario(self,
328
331
            workingtree_format, workingtree_format._matchingbzrdir)[1]
329
 
        scenario_options["workingtree_to_test_tree"] = converter
 
332
        scenario_options["_workingtree_to_test_tree"] = converter
330
333
        return name, scenario_options
331
334
 
332
335