~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_knit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-11-17 03:20:35 UTC
  • mfrom: (4792.4.3 456036)
  • Revision ID: pqm@pqm.ubuntu.com-20091117032035-s3sgtlixj1lrminn
(Gordon Tyler) Fix IndexError during 'bzr ignore /' (#456036)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    multiparent,
29
29
    osutils,
30
30
    pack,
31
 
    tests,
32
31
    )
33
32
from bzrlib.errors import (
34
33
    RevisionAlreadyPresent,
70
69
    )
71
70
 
72
71
 
73
 
compiled_knit_feature = tests.ModuleAvailableFeature(
74
 
                            'bzrlib._knit_load_data_pyx')
 
72
class _CompiledKnitFeature(Feature):
 
73
 
 
74
    def _probe(self):
 
75
        try:
 
76
            import bzrlib._knit_load_data_pyx
 
77
        except ImportError:
 
78
            return False
 
79
        return True
 
80
 
 
81
    def feature_name(self):
 
82
        return 'bzrlib._knit_load_data_pyx'
 
83
 
 
84
CompiledKnitFeature = _CompiledKnitFeature()
75
85
 
76
86
 
77
87
class KnitContentTestsMixin(object):
1298
1308
 
1299
1309
class LowLevelKnitIndexTests_c(LowLevelKnitIndexTests):
1300
1310
 
1301
 
    _test_needs_features = [compiled_knit_feature]
 
1311
    _test_needs_features = [CompiledKnitFeature]
1302
1312
 
1303
1313
    def get_knit_index(self, transport, name, mode):
1304
1314
        mapper = ConstantMapper(name)