~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/features.py

  • Committer: Jonathan Riddell
  • Date: 2011-06-17 09:07:12 UTC
  • mfrom: (5984 +trunk)
  • mto: (5971.2.3 bzr-gpgme)
  • mto: This revision was merged to the branch mainline in revision 6003.
  • Revision ID: jriddell@canonical.com-20110617090712-gbp520g89lwfhihn
mergeĀ inĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
import stat
 
21
import sys
21
22
 
22
23
from bzrlib import (
23
24
    osutils,
49
50
pywintypes = tests.ModuleAvailableFeature('pywintypes')
50
51
sphinx = tests.ModuleAvailableFeature('sphinx')
51
52
subunit = tests.ModuleAvailableFeature('subunit')
 
53
testtools = tests.ModuleAvailableFeature('testtools')
52
54
 
53
55
 
54
56
class _BackslashDirSeparatorFeature(tests.Feature):
127
129
bash_feature = ExecutableFeature('bash')
128
130
sed_feature = ExecutableFeature('sed')
129
131
diff_feature = ExecutableFeature('diff')
 
132
 
 
133
 
 
134
class Win32Feature(tests.Feature):
 
135
    """Feature testing whether we're running selftest on Windows
 
136
    or Windows-like platform.
 
137
    """
 
138
 
 
139
    def _probe(self):
 
140
        return sys.platform == 'win32'
 
141
 
 
142
    def feature_name(self):
 
143
        return "win32 platform"
 
144
 
 
145
win32_feature = Win32Feature()