/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-20 02:57:52 UTC
  • mfrom: (4797.43.11 2.1)
  • mto: This revision was merged to the branch mainline in revision 5243.
  • Revision ID: robertc@robertcollins.net-20100520025752-dbfi4kx7y4ivtiff
Merge up from 2.0/2.1:

* Support Pyrex 0.9.9, required changing how we handle exceptions in Pyrex.
  (John Arbash Meinel, #582656)

* ``bzr clean-tree`` should not delete nested bzrdirs. Required for proper
  support of bzr-externals and scmproj plugins.
  (Alexander Belchenko, bug #572098)

* Reduce peak memory by one copy of compressed text.
  (John Arbash Meinel, #566940)

* Support Pyrex 0.9.9, required changing how we handle exceptions in Pyrex.
  (John Arbash Meinel, #582656)

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