/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: John Arbash Meinel
  • Date: 2006-05-10 19:59:55 UTC
  • mfrom: (1704 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: john@arbash-meinel.com-20060510195955-df080afb1daa3a96
[merge] bzr.dev 1704

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
        self.assertContainsRe(result, r'^[a-z0-9]{100}$')
72
72
 
73
73
 
 
74
    def test_rmtree(self):
 
75
        # Check to remove tree with read-only files/dirs
 
76
        os.mkdir('dir')
 
77
        f = file('dir/file', 'w')
 
78
        f.write('spam')
 
79
        f.close()
 
80
        # would like to also try making the directory readonly, but at the
 
81
        # moment python shutil.rmtree doesn't handle that properly - it would
 
82
        # need to chmod the directory before removing things inside it - deferred
 
83
        # for now -- mbp 20060505
 
84
        # osutils.make_readonly('dir')
 
85
        osutils.make_readonly('dir/file')
 
86
 
 
87
        osutils.rmtree('dir')
 
88
 
 
89
        self.failIfExists('dir/file')
 
90
        self.failIfExists('dir')
 
91
 
 
92
 
74
93
class TestSafeUnicode(TestCase):
75
94
 
76
95
    def test_from_ascii_string(self):