/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__chunks_to_lines.py

merge bzr.dev r4154

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
def load_tests(standard_tests, module, loader):
24
24
    # parameterize all tests in this module
25
 
    suite = loader.suiteClass()
26
 
    applier = tests.TestScenarioApplier()
27
25
    import bzrlib._chunks_to_lines_py as py_module
28
 
    applier.scenarios = [('python', {'module': py_module})]
 
26
    scenarios = [('python', {'module': py_module})]
29
27
    if CompiledChunksToLinesFeature.available():
30
28
        import bzrlib._chunks_to_lines_pyx as c_module
31
 
        applier.scenarios.append(('C', {'module': c_module}))
 
29
        scenarios.append(('C', {'module': c_module}))
32
30
    else:
33
31
        # the compiled module isn't available, so we add a failing test
34
32
        class FailWithoutFeature(tests.TestCase):
35
33
            def test_fail(self):
36
34
                self.requireFeature(CompiledChunksToLinesFeature)
37
 
        suite.addTest(loader.loadTestsFromTestCase(FailWithoutFeature))
38
 
    tests.adapt_tests(standard_tests, applier, suite)
39
 
    return suite
 
35
        standard_tests.addTest(FailWithoutFeature("test_fail"))
 
36
    return tests.multiply_tests(standard_tests, scenarios, loader.suiteClass())
40
37
 
41
38
 
42
39
class _CompiledChunksToLinesFeature(tests.Feature):