/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_btree_index.py

  • Committer: Robert Collins
  • Date: 2009-03-07 06:58:17 UTC
  • mto: This revision was merged to the branch mainline in revision 4098.
  • Revision ID: robertc@robertcollins.net-20090307065817-btjngdy1cvv4nwfo
Bulk update all test adaptation into a single approach, using multiply_tests rather than test adapters.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    )
28
28
from bzrlib.tests import (
29
29
    TestCaseWithTransport,
30
 
    TestScenarioApplier,
31
 
    adapt_tests,
32
30
    condition_isinstance,
 
31
    multiply_tests,
33
32
    split_suite_by_condition,
34
33
    )
35
34
from bzrlib.transport import get_transport
39
38
    # parameterise the TestBTreeNodes tests
40
39
    node_tests, others = split_suite_by_condition(standard_tests,
41
40
        condition_isinstance(TestBTreeNodes))
42
 
    applier = TestScenarioApplier()
43
41
    import bzrlib._btree_serializer_py as py_module
44
 
    applier.scenarios = [('python', {'parse_btree': py_module})]
 
42
    scenarios = [('python', {'parse_btree': py_module})]
45
43
    if CompiledBtreeParserFeature.available():
46
44
        # Is there a way to do this that gets missing feature failures rather
47
45
        # than no indication to the user?
48
46
        import bzrlib._btree_serializer_c as c_module
49
 
        applier.scenarios.append(('C', {'parse_btree': c_module}))
50
 
    adapt_tests(node_tests, applier, others)
51
 
    return others
 
47
        scenarios.append(('C', {'parse_btree': c_module}))
 
48
    return multiply_tests(node_tests, scenarios, others)
52
49
 
53
50
 
54
51
class _CompiledBtreeParserFeature(tests.Feature):