/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: Robert Collins
  • Date: 2010-05-21 07:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 5247.
  • Revision ID: robertc@robertcollins.net-20100521071713-2wx301fr3h205t4x
* ``bzr lp-propose`` which was switched to use production Launchpad API
  servers a few commits ago has been reverted to use edge: there is a
  problem with using production which isn't trivially obvious, so we've
  filed a bug to track it, and until thats fixed will be using edge.
  (Robert Collins, #583667)

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):