~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/__init__.py

  • Committer: Robert Collins
  • Date: 2007-04-23 02:29:35 UTC
  • mfrom: (2441 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2442.
  • Revision ID: robertc@robertcollins.net-20070423022935-9hhongamvk6bfdso
Resolve conflicts with bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
                           BranchTestProviderAdapter,
29
29
                           _legacy_formats,
30
30
                           )
 
31
from bzrlib.smart.server import (
 
32
    SmartTCPServer_for_testing,
 
33
    ReadonlySmartTCPServer_for_testing,
 
34
    )
31
35
from bzrlib.tests import (
32
36
                          adapt_modules,
33
 
                          default_transport,
34
37
                          TestLoader,
35
38
                          TestSuite,
36
39
                          )
 
40
from bzrlib.remote import RemoteBranchFormat, RemoteBzrDirFormat
 
41
from bzrlib.transport.memory import MemoryServer
37
42
 
38
43
 
39
44
def test_suite():
42
47
        'bzrlib.tests.branch_implementations.test_bound_sftp',
43
48
        'bzrlib.tests.branch_implementations.test_branch',
44
49
        'bzrlib.tests.branch_implementations.test_break_lock',
 
50
        'bzrlib.tests.branch_implementations.test_create_checkout',
45
51
        'bzrlib.tests.branch_implementations.test_commit',
46
52
        'bzrlib.tests.branch_implementations.test_hooks',
47
53
        'bzrlib.tests.branch_implementations.test_http',
50
56
        'bzrlib.tests.branch_implementations.test_parent',
51
57
        'bzrlib.tests.branch_implementations.test_permissions',
52
58
        'bzrlib.tests.branch_implementations.test_pull',
 
59
        'bzrlib.tests.branch_implementations.test_push',
 
60
        'bzrlib.tests.branch_implementations.test_revision_history',
53
61
        'bzrlib.tests.branch_implementations.test_tags',
54
 
        'bzrlib.tests.branch_implementations.test_push',
55
62
        'bzrlib.tests.branch_implementations.test_uncommit',
56
63
        'bzrlib.tests.branch_implementations.test_update',
57
64
        ]
 
65
    # Generate a list of branch formats and their associated bzrdir formats to
 
66
    # use.
 
67
    combinations = [(format, format._matchingbzrdir) for format in 
 
68
         BranchFormat._formats.values() + _legacy_formats]
58
69
    adapter = BranchTestProviderAdapter(
59
 
        default_transport,
 
70
        # None here will cause the default vfs transport server to be used.
 
71
        None,
60
72
        # None here will cause a readonly decorator to be created
61
73
        # by the TestCaseWithTransport.get_readonly_transport method.
62
74
        None,
63
 
        [(format, format._matchingbzrdir) for format in 
64
 
         BranchFormat._formats.values() + _legacy_formats])
 
75
        combinations)
65
76
    loader = TestLoader()
66
77
    adapt_modules(test_branch_implementations, adapter, loader, result)
 
78
 
 
79
 
 
80
    adapt_to_smart_server = BranchTestProviderAdapter(
 
81
        SmartTCPServer_for_testing,
 
82
        ReadonlySmartTCPServer_for_testing,
 
83
        [(RemoteBranchFormat(), RemoteBzrDirFormat())],
 
84
        MemoryServer
 
85
        )
 
86
    adapt_modules(test_branch_implementations,
 
87
                  adapt_to_smart_server,
 
88
                  loader,
 
89
                  result)
 
90
 
67
91
    return result