/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 bzrlib/tests/features.py

  • Committer: Martin
  • Date: 2010-05-25 17:27:52 UTC
  • mfrom: (5254 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5257.
  • Revision ID: gzlist@googlemail.com-20100525172752-amm089xcikv968sw
Merge bzr.dev to unite with similar changes already made

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
 
17
"""A collection of commonly used 'Features' which bzrlib uses to skip tests."""
 
18
 
17
19
import os
18
20
import stat
19
21
 
24
26
apport = tests.ModuleAvailableFeature('apport')
25
27
paramiko = tests.ModuleAvailableFeature('paramiko')
26
28
pycurl = tests.ModuleAvailableFeature('pycurl')
 
29
pywintypes = tests.ModuleAvailableFeature('pywintypes')
27
30
subunit = tests.ModuleAvailableFeature('subunit')
28
31
 
29
32
 
 
33
class _BackslashDirSeparatorFeature(tests.Feature):
 
34
 
 
35
    def _probe(self):
 
36
        try:
 
37
            os.lstat(os.getcwd() + '\\')
 
38
        except OSError:
 
39
            return False
 
40
        else:
 
41
            return True
 
42
 
 
43
    def feature_name(self):
 
44
        return "Filesystem treats '\\' as a directory separator."
 
45
 
 
46
backslashdir_feature = _BackslashDirSeparatorFeature()
 
47
 
 
48
 
30
49
class _PosixPermissionsFeature(tests.Feature):
31
50
 
32
51
    def _probe(self):