~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/features.py

  • Committer: Gary van der Merwe
  • Date: 2010-08-02 19:56:52 UTC
  • mfrom: (5050.3.18 2.2)
  • mto: (5050.3.19 2.2)
  • mto: This revision was merged to the branch mainline in revision 5371.
  • Revision ID: garyvdm@gmail.com-20100802195652-o1ppjemhwrr98i61
MergeĀ lp:bzr/2.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from bzrlib.symbol_versioning import deprecated_in
24
24
 
25
25
 
26
 
class _NotRunningAsRoot(tests.Feature):
27
 
 
28
 
    def _probe(self):
29
 
        try:
30
 
            uid = os.getuid()
31
 
        except AttributeError:
32
 
            # If there is no uid, chances are there is no root either
33
 
            return True
34
 
        return uid != 0
35
 
 
36
 
    def feature_name(self):
37
 
        return 'Not running as root'
38
 
 
39
 
 
40
 
not_running_as_root = _NotRunningAsRoot()
41
26
apport = tests.ModuleAvailableFeature('apport')
42
27
paramiko = tests.ModuleAvailableFeature('paramiko')
43
28
pycurl = tests.ModuleAvailableFeature('pycurl')
44
29
pywintypes = tests.ModuleAvailableFeature('pywintypes')
45
30
subunit = tests.ModuleAvailableFeature('subunit')
46
 
sphinx = tests.ModuleAvailableFeature('sphinx')
47
31
 
48
32
 
49
33
class _BackslashDirSeparatorFeature(tests.Feature):
129
113
 
130
114
bash_feature = ExecutableFeature('bash')
131
115
sed_feature = ExecutableFeature('sed')
132
 
diff_feature = ExecutableFeature('diff')