~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/features.py

  • Committer: Andrew Bennetts
  • Date: 2010-03-26 04:47:45 UTC
  • mfrom: (5116 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5117.
  • Revision ID: andrew.bennetts@canonical.com-20100326044745-ubvt5tmse1a17s1f
MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
pycurl = tests.ModuleAvailableFeature('pycurl')
27
27
subunit = tests.ModuleAvailableFeature('subunit')
28
28
 
 
29
 
29
30
class _PosixPermissionsFeature(tests.Feature):
30
31
 
31
32
    def _probe(self):
48
49
    def feature_name(self):
49
50
        return 'POSIX permissions support'
50
51
 
51
 
PosixPermissionsFeature = _PosixPermissionsFeature()
 
52
 
 
53
posix_permissions_feature = _PosixPermissionsFeature()
 
54
 
 
55
 
 
56
class _ChownFeature(tests.Feature):
 
57
    """os.chown is supported"""
 
58
 
 
59
    def _probe(self):
 
60
        return os.name == 'posix' and hasattr(os, 'chown')
 
61
 
 
62
chown_feature = _ChownFeature()
 
63