~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/features.py

``.bazaar``, ``.bazaar/bazaar.conf`` and ``.bzr.log`` inherit user and group ownership from the containing directory. This allow bzr to work better with sudo.

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