/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 04:27:11 UTC
  • mto: This revision was merged to the branch mainline in revision 5248.
  • Revision ID: robertc@robertcollins.net-20100521042711-gt6x2vojrm4flnc9
Allow setting new proposals as approved immediately.

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
 
27
29
subunit = tests.ModuleAvailableFeature('subunit')
28
30
 
29
31
 
 
32
class _BackslashDirSeparatorFeature(tests.Feature):
 
33
 
 
34
    def _probe(self):
 
35
        try:
 
36
            os.lstat(os.getcwd() + '\\')
 
37
        except OSError:
 
38
            return False
 
39
        else:
 
40
            return True
 
41
 
 
42
    def feature_name(self):
 
43
        return "Filesystem treats '\\' as a directory separator."
 
44
 
 
45
backslashdir_feature = _BackslashDirSeparatorFeature()
 
46
 
 
47
 
30
48
class _PosixPermissionsFeature(tests.Feature):
31
49
 
32
50
    def _probe(self):