29
29
from bzrlib.tests import (
32
TestCaseWithTransport,
35
from bzrlib.tests.bzrdir_implementations.test_bzrdir import TestCaseWithBzrDir
36
36
from bzrlib.workingtree import (WorkingTreeFormat,
37
37
WorkingTreeTestProviderAdapter,
42
class TestCaseWithWorkingTree(TestCaseWithTransport):
44
def make_bzrdir(self, relpath):
45
# todo factor out into bzrdir-using-implementations-tests-base-class
47
url = self.get_url(relpath)
48
segments = url.split('/')
49
if segments and segments[-1] not in ('', '.'):
50
parent = '/'.join(segments[:-1])
51
t = get_transport(parent)
54
except errors.FileExists:
56
return self.bzrdir_format.initialize(url)
57
except errors.UninitializableFormat:
58
raise TestSkipped("Format %s is not initializable.")
60
def make_branch_and_tree(self, relpath):
61
made_control = self.make_bzrdir(relpath)
42
class TestCaseWithWorkingTree(TestCaseWithBzrDir):
44
def make_branch_and_tree(self, relpath, format=None):
45
made_control = self.make_bzrdir(relpath, format=format)
62
46
made_control.create_repository()
63
47
made_control.create_branch()
64
48
return self.workingtree_format.initialize(made_control)
68
52
result = TestSuite()
69
53
test_workingtree_implementations = [
54
'bzrlib.tests.workingtree_implementations.test_basis_inventory',
70
55
'bzrlib.tests.workingtree_implementations.test_is_control_filename',
71
56
'bzrlib.tests.workingtree_implementations.test_pull',
72
57
'bzrlib.tests.workingtree_implementations.test_workingtree',