/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/test_osutils.py

  • Committer: Vincent Ladeuil
  • Date: 2007-11-04 15:29:17 UTC
  • mfrom: (2961 +trunk)
  • mto: (2961.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2962.
  • Revision ID: v.ladeuil+lp@free.fr-20071104152917-nrsumxpk3dikso2c
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
from bzrlib.tests import (
38
38
        probe_unicode_in_user_encoding,
39
39
        StringIOWrapper,
 
40
        SymlinkFeature,
40
41
        TestCase,
41
42
        TestCaseInTempDir,
42
43
        TestSkipped,
250
251
        self.assertFormatedDelta('2 seconds in the future', -2)
251
252
 
252
253
    def test_dereference_path(self):
253
 
        if not osutils.has_symlinks():
254
 
            raise TestSkipped('Symlinks are not supported on this platform')
 
254
        self.requireFeature(SymlinkFeature)
255
255
        cwd = osutils.realpath('.')
256
256
        os.mkdir('bar')
257
257
        bar_path = osutils.pathjoin(cwd, 'bar')
284
284
 
285
285
        # Make a file readonly
286
286
        osutils.make_readonly('file')
287
 
        mode = osutils.lstat('file').st_mode
 
287
        mode = os.lstat('file').st_mode
288
288
        self.assertEqual(mode, mode & 0777555)
289
289
 
290
290
        # Make a file writable
291
291
        osutils.make_writable('file')
292
 
        mode = osutils.lstat('file').st_mode
 
292
        mode = os.lstat('file').st_mode
293
293
        self.assertEqual(mode, mode | 0200)
294
294
 
295
295
        if osutils.has_symlinks():
937
937
        self.assertEqual(['c'], os.listdir('target/b'))
938
938
 
939
939
    def test_copy_tree_symlinks(self):
940
 
        if not osutils.has_symlinks():
941
 
            return
 
940
        self.requireFeature(SymlinkFeature)
942
941
        self.build_tree(['source/'])
943
942
        os.symlink('a/generic/path', 'source/lnk')
944
943
        osutils.copy_tree('source', 'target')