~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

Update test support, and remove deprecated functions pullable_revisions and get_intervening_revisions.

Show diffs side-by-side

added added

removed removed

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