/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 breezy/tests/test_clean_tree.py

  • Committer: Jelmer Vernooij
  • Date: 2019-03-04 00:16:27 UTC
  • mfrom: (7293 work)
  • mto: This revision was merged to the branch mainline in revision 7318.
  • Revision ID: jelmer@jelmer.uk-20190304001627-v6u7o6pf97tukhek
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
                    # be shown to the user.
111
111
                    function = os.listdir
112
112
                onerror(function=function,
113
 
                    path=path, excinfo=excinfo)
 
113
                        path=path, excinfo=excinfo)
114
114
 
115
115
        self.overrideAttr(os, 'unlink', _dummy_unlink)
116
116
        self.overrideAttr(shutil, 'rmtree', _dummy_rmtree)
121
121
        self.build_tree(['0foo', '1bar', '2baz', 'subdir0/'])
122
122
        clean_tree('.', unknown=True, no_prompt=True)
123
123
        self.assertContainsRe(stderr.getvalue(),
124
 
            'bzr: warning: unable to remove.*0foo')
 
124
                              'bzr: warning: unable to remove.*0foo')
125
125
        self.assertContainsRe(stderr.getvalue(),
126
 
            'bzr: warning: unable to remove.*subdir0')
 
126
                              'bzr: warning: unable to remove.*subdir0')
127
127
 
128
128
        # Ensure that error other than EACCES during os.remove are
129
129
        # not turned into warnings.
130
130
        self.build_tree(['subdir1/'])
131
131
        self.assertRaises(OSError, clean_tree, '.',
132
 
            unknown=True, no_prompt=True)
133
 
 
 
132
                          unknown=True, no_prompt=True)