~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
        """See WorkingTreeFormat.get_format_string()."""
95
95
        return "Sample tree format."
96
96
 
97
 
    def initialize(self, a_bzrdir, revision_id=None, from_branch=None):
 
97
    def initialize(self, a_bzrdir, revision_id=None, from_branch=None,
 
98
                   accelerator_tree=None):
98
99
        """Sample branches cannot be created."""
99
100
        t = a_bzrdir.get_workingtree_transport(self)
100
101
        t.put_bytes('format', self.get_format_string())
375
376
        file_conflict = conflicts.TextConflict('file', None, 'hello-id')
376
377
        tree.set_conflicts(conflicts.ConflictList([file_conflict]))
377
378
        tree.auto_resolve()
 
379
 
 
380
 
 
381
class TestFindTrees(TestCaseWithTransport):
 
382
 
 
383
    def test_find_trees(self):
 
384
        self.make_branch_and_tree('foo')
 
385
        self.make_branch_and_tree('foo/bar')
 
386
        # Sticking a tree inside a control dir is heinous, so let's skip it
 
387
        self.make_branch_and_tree('foo/.bzr/baz')
 
388
        self.make_branch('qux')
 
389
        trees = workingtree.WorkingTree.find_trees('.')
 
390
        self.assertEqual(2, len(list(trees)))