~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_diff.py

Change all of the compiled_foo to compiled_foo_feature

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
AttribFeature = _AttribFeature()
64
64
 
65
65
 
66
 
compiled_patiencediff = tests.ModuleAvailableFeature('bzrlib._patiencediff_c')
 
66
compiled_patiencediff_feature = tests.ModuleAvailableFeature(
 
67
                                    'bzrlib._patiencediff_c')
67
68
 
68
69
 
69
70
def udiff_lines(old, new, allow_binary=False):
1144
1145
 
1145
1146
class TestPatienceDiffLib_c(TestPatienceDiffLib):
1146
1147
 
1147
 
    _test_needs_features = [compiled_patiencediff]
 
1148
    _test_needs_features = [compiled_patiencediff_feature]
1148
1149
 
1149
1150
    def setUp(self):
1150
1151
        super(TestPatienceDiffLib_c, self).setUp()
1240
1241
 
1241
1242
class TestPatienceDiffLibFiles_c(TestPatienceDiffLibFiles):
1242
1243
 
1243
 
    _test_needs_features = [compiled_patiencediff]
 
1244
    _test_needs_features = [compiled_patiencediff_feature]
1244
1245
 
1245
1246
    def setUp(self):
1246
1247
        super(TestPatienceDiffLibFiles_c, self).setUp()
1252
1253
class TestUsingCompiledIfAvailable(TestCase):
1253
1254
 
1254
1255
    def test_PatienceSequenceMatcher(self):
1255
 
        if compiled_patiencediff.available():
 
1256
        if compiled_patiencediff_feature.available():
1256
1257
            from bzrlib._patiencediff_c import PatienceSequenceMatcher_c
1257
1258
            self.assertIs(PatienceSequenceMatcher_c,
1258
1259
                          bzrlib.patiencediff.PatienceSequenceMatcher)
1262
1263
                          bzrlib.patiencediff.PatienceSequenceMatcher)
1263
1264
 
1264
1265
    def test_unique_lcs(self):
1265
 
        if compiled_patiencediff.available():
 
1266
        if compiled_patiencediff_feature.available():
1266
1267
            from bzrlib._patiencediff_c import unique_lcs_c
1267
1268
            self.assertIs(unique_lcs_c,
1268
1269
                          bzrlib.patiencediff.unique_lcs)
1272
1273
                          bzrlib.patiencediff.unique_lcs)
1273
1274
 
1274
1275
    def test_recurse_matches(self):
1275
 
        if compiled_patiencediff.available():
 
1276
        if compiled_patiencediff_feature.available():
1276
1277
            from bzrlib._patiencediff_c import recurse_matches_c
1277
1278
            self.assertIs(recurse_matches_c,
1278
1279
                          bzrlib.patiencediff.recurse_matches)