~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_clean_tree.py

  • Committer: Jelmer Vernooij
  • Date: 2016-04-03 16:32:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6617.
  • Revision ID: jelmer@jelmer.uk-20160403163231-h72bo0uyek2gikw0
Don't put French text in doc/en/user-reference when LANGUAGE=fr_CH.UTF_8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import os
20
20
import shutil
21
21
import sys
22
 
import types
23
22
 
24
23
from bzrlib import tests, ui
25
 
from bzrlib.bzrdir import (
26
 
    BzrDir,
 
24
from bzrlib.controldir import (
 
25
    ControlDir,
27
26
    )
28
27
from bzrlib.clean_tree import (
29
28
    clean_tree,
43
42
        if has_symlinks() is False:
44
43
            return
45
44
        os.mkdir('branch')
46
 
        BzrDir.create_standalone_workingtree('branch')
 
45
        ControlDir.create_standalone_workingtree('branch')
47
46
        os.symlink(os.path.realpath('no-die-please'), 'branch/die-please')
48
47
        os.mkdir('no-die-please')
49
48
        self.assertPathExists('branch/die-please')
56
55
    def test_iter_deletable(self):
57
56
        """Files are selected for deletion appropriately"""
58
57
        os.mkdir('branch')
59
 
        tree = BzrDir.create_standalone_workingtree('branch')
 
58
        tree = ControlDir.create_standalone_workingtree('branch')
60
59
        transport = tree.bzrdir.root_transport
61
60
        transport.put_bytes('.bzrignore', '*~\n*.pyc\n.bzrignore\n')
62
61
        transport.put_bytes('file.BASE', 'contents')
122
121
        stderr = tests.StringIOWrapper()
123
122
        ui.ui_factory = tests.TestUIFactory(stdout=stdout, stderr=stderr)
124
123
 
125
 
        BzrDir.create_standalone_workingtree('.')
 
124
        ControlDir.create_standalone_workingtree('.')
126
125
        self.build_tree(['0foo', '1bar', '2baz', 'subdir0/'])
127
126
        clean_tree('.', unknown=True, no_prompt=True)
128
127
        self.assertContainsRe(stderr.getvalue(),