~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_knit.py

  • Committer: Andrew Bennetts
  • Date: 2010-01-15 03:58:20 UTC
  • mfrom: (4963 +trunk)
  • mto: (4973.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4975.
  • Revision ID: andrew.bennetts@canonical.com-20100115035820-ilb3t36swgzq6v1l
MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    multiparent,
29
29
    osutils,
30
30
    pack,
 
31
    tests,
31
32
    )
32
33
from bzrlib.errors import (
33
34
    RevisionAlreadyPresent,
69
70
    )
70
71
 
71
72
 
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()
 
73
compiled_knit_feature = tests.ModuleAvailableFeature(
 
74
                            'bzrlib._knit_load_data_pyx')
85
75
 
86
76
 
87
77
class KnitContentTestsMixin(object):
1308
1298
 
1309
1299
class LowLevelKnitIndexTests_c(LowLevelKnitIndexTests):
1310
1300
 
1311
 
    _test_needs_features = [CompiledKnitFeature]
 
1301
    _test_needs_features = [compiled_knit_feature]
1312
1302
 
1313
1303
    def get_knit_index(self, transport, name, mode):
1314
1304
        mapper = ConstantMapper(name)