~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_test_server.py

  • Committer: Martin Pool
  • Date: 2010-12-09 04:26:53 UTC
  • mto: This revision was merged to the branch mainline in revision 5564.
  • Revision ID: mbp@canonical.com-20101209042653-hgy6vkrlfvi1d7rs
Change to using standard load_tests_apply_scenarios.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    tests,
25
25
    )
26
26
from bzrlib.tests import test_server
27
 
 
28
 
 
29
 
def load_tests(basic_tests, module, loader):
30
 
    suite = loader.suiteClass()
31
 
    server_tests, remaining_tests = tests.split_suite_by_condition(
32
 
        basic_tests, tests.condition_isinstance(TestTCPServerInAThread))
33
 
    server_scenarios = [ (name, {'server_class': getattr(test_server, name)})
34
 
                         for name in
35
 
                         ('TestingTCPServer', 'TestingThreadingTCPServer')]
36
 
    tests.multiply_tests(server_tests, server_scenarios, suite)
37
 
    suite.addTest(remaining_tests)
38
 
    return suite
 
27
from bzrlib.tests.scenarios import load_tests_apply_scenarios
 
28
 
 
29
 
 
30
load_tests = load_tests_apply_scenarios
39
31
 
40
32
 
41
33
class TestThreadWithException(tests.TestCase):
129
121
 
130
122
class TestTCPServerInAThread(tests.TestCase):
131
123
 
 
124
    scenarios = [ 
 
125
        (name, {'server_class': getattr(test_server, name)})
 
126
        for name in
 
127
        ('TestingTCPServer', 'TestingThreadingTCPServer')]
 
128
 
132
129
    # Set by load_tests()
133
130
    server_class = None
134
131