~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
                          TestLoader,
40
40
                          TestSuite,
41
41
                          )
 
42
from bzrlib.transport.memory import MemoryServer
42
43
 
43
44
 
44
45
def test_suite():
53
54
        'bzrlib.tests.repository_implementations.test_revision',
54
55
        'bzrlib.tests.repository_implementations.test_statistics',
55
56
        ]
 
57
 
 
58
    from bzrlib.smart.server import (
 
59
        SmartTCPServer_for_testing,
 
60
        ReadonlySmartTCPServer_for_testing,
 
61
        )
 
62
    from bzrlib.remote import RemoteBzrDirFormat, RemoteRepositoryFormat
 
63
 
56
64
    registry = repository.format_registry
57
65
    all_formats = [registry.get(k) for k in registry.keys()]
58
66
    all_formats.extend(weaverepo._legacy_formats)
64
72
        [(format, format._matchingbzrdir) for format in all_formats])
65
73
    loader = TestLoader()
66
74
    adapt_modules(test_repository_implementations, adapter, loader, result)
 
75
 
 
76
    adapt_to_smart_server = RepositoryTestProviderAdapter(
 
77
        SmartTCPServer_for_testing,
 
78
        ReadonlySmartTCPServer_for_testing,
 
79
        [(RemoteRepositoryFormat(), RemoteBzrDirFormat())],
 
80
        MemoryServer
 
81
        )
 
82
    adapt_modules(test_repository_implementations,
 
83
                  adapt_to_smart_server,
 
84
                  loader,
 
85
                  result)
 
86
 
67
87
    return result