23
23
def load_tests(standard_tests, module, loader):
24
# parameterize all tests in this module
25
import bzrlib._chunks_to_lines_py as py_module
26
scenarios = [('python', {'module': py_module})]
27
if compiled_chunkstolines_feature.available():
28
scenarios.append(('C', {'module':
29
compiled_chunkstolines_feature.module}))
31
# the compiled module isn't available, so we add a failing test
32
class FailWithoutFeature(tests.TestCase):
34
self.requireFeature(compiled_chunkstolines_feature)
35
standard_tests.addTest(FailWithoutFeature("test_fail"))
36
return tests.multiply_tests(standard_tests, scenarios, loader.suiteClass())
24
suite, _ = tests.permute_tests_for_extension(
25
standard_tests, loader, 'bzrlib._chunks_to_lines_py',
26
'bzrlib._chunks_to_lines_pyx')
29
# test_osutils depends on this feature being around. We can't just use the one
30
# generated by load_tests, because if we only load osutils but not this module,
31
# then that code never gets run
39
32
compiled_chunkstolines_feature = tests.ModuleAvailableFeature(
40
33
'bzrlib._chunks_to_lines_pyx')