33
33
('python', {'_gc_module': _groupcompress_py}),
35
if CompiledGroupCompressFeature.available():
36
from bzrlib import _groupcompress_pyx
35
if compiled_groupcompress.available():
37
36
scenarios.append(('C',
38
{'_gc_module': _groupcompress_pyx}))
37
{'_gc_module': compiled_groupcompress.module}))
39
38
two_way_scenarios.extend([
40
('CC', {'make_delta': _groupcompress_pyx.make_delta,
41
'apply_delta': _groupcompress_pyx.apply_delta}),
39
('CC', {'make_delta': compiled_groupcompress.module.make_delta,
40
'apply_delta': compiled_groupcompress.module.apply_delta}),
42
41
('PC', {'make_delta': _groupcompress_py.make_delta,
43
'apply_delta': _groupcompress_pyx.apply_delta}),
44
('CP', {'make_delta': _groupcompress_pyx.make_delta,
42
'apply_delta': compiled_groupcompress.module.apply_delta}),
43
('CP', {'make_delta': compiled_groupcompress.module.make_delta,
45
44
'apply_delta': _groupcompress_py.apply_delta}),
47
46
to_adapt, result = tests.split_suite_by_condition(
57
class _CompiledGroupCompressFeature(tests.Feature):
61
import bzrlib._groupcompress_pyx
67
def feature_name(self):
68
return 'bzrlib._groupcompress_pyx'
71
CompiledGroupCompressFeature = _CompiledGroupCompressFeature()
56
compiled_groupcompress = tests.ModuleAvailableFeature(
57
'bzrlib._groupcompress_pyx')
264
250
# This test isn't multiplied, because we only have DeltaIndex for the
266
252
# We call this here, because _test_needs_features happens after setUp
267
self.requireFeature(CompiledGroupCompressFeature)
268
from bzrlib import _groupcompress_pyx
269
self._gc_module = _groupcompress_pyx
253
self.requireFeature(compiled_groupcompress)
254
self._gc_module = compiled_groupcompress.module
271
256
def test_repr(self):
272
257
di = self._gc_module.DeltaIndex('test text\n')