~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-19 16:41:31 UTC
  • mfrom: (4788.2.2 2.1.0b3-gc-nogil)
  • Revision ID: pqm@pqm.ubuntu.com-20091119164131-pg4ky6zrxe6kpzhq
(jam) Release the gil during some of the core groupcompress code
        paths.

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)