~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2007-04-24 05:02:04 UTC
  • mfrom: (2449 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2450.
  • Revision ID: mbp@sourcefrog.net-20070424050204-bfkc1qiq0axt5f14
Merge trunk & fix NEWS conflict

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():
62
67
    combinations = [(format, format._matchingbzrdir) for format in 
63
68
         BranchFormat._formats.values() + _legacy_formats]
64
69
    adapter = BranchTestProviderAdapter(
65
 
        default_transport,
 
70
        # None here will cause the default vfs transport server to be used.
 
71
        None,
66
72
        # None here will cause a readonly decorator to be created
67
73
        # by the TestCaseWithTransport.get_readonly_transport method.
68
74
        None,
69
75
        combinations)
70
76
    loader = TestLoader()
71
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
 
72
91
    return result