/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to tests/__init__.py

Add DulwichFeature.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import time
21
21
 
22
22
from bzrlib import (
 
23
    errors as bzr_errors,
23
24
    osutils,
24
25
    tests,
25
26
    trace,
26
27
    )
27
28
from bzrlib.plugins.git import (
28
29
    errors,
 
30
    import_dulwich,
29
31
    )
30
32
 
31
33
TestCase = tests.TestCase
47
49
    def feature_name(self):
48
50
        return 'git'
49
51
 
 
52
class _DulwichFeature(tests.Feature):
 
53
 
 
54
    def _probe(self):
 
55
        try:
 
56
            import_dulwich()
 
57
        except bzr_errors.DependencyNotPresent:
 
58
            return False
 
59
        return True
 
60
 
 
61
    def feature_name(self):
 
62
        return 'dulwich'
 
63
 
 
64
 
50
65
GitCommandFeature = _GitCommandFeature()
 
66
DulwichFeature = _DulwichFeature()
51
67
 
52
68
 
53
69
def run_git(*args):